diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index c4c7a51e95..13f5fc82f7 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -1,6 +1,9 @@ -#!/bin/sh +#!/bin/bash -# run this script from the root of the repo +# Author: @MikeRalphson + +# run this script from the root of the repo. It is designed to be run by a GitHub workflow. +# It contains bashisms mkdir -p deploy/oas mkdir -p deploy/js diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index 23c66adac4..b88309b45d 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -26,6 +26,7 @@ let argv = require('yargs') .describe('maintainers','path to MAINTAINERS.md') .require(1) .argv; +const abstract = 'What is the OpenAPI Specification?'; let maintainers = []; let emeritus = []; @@ -66,14 +67,14 @@ function preface(title,options) { includePermalinks: true }; - let preface = `${md.utils.escapeHtml(title)}`; + let preface = `${md.utils.escapeHtml(title)}`; // SEO preface += ''; preface += ''; if (options.respec) { - preface += ''; + preface += ''; preface += ``; preface += fs.readFileSync('./analytics/google.html','utf8'); preface += ''; @@ -90,7 +91,8 @@ function preface(title,options) { preface += 'pre { background-color: #f6f8fa !important; }'; preface += fs.readFileSync(path.resolve(__dirname,'gist.css'),'utf8').split('\n').join(' '); preface += ''; - preface += '
'; + preface += `

${title.split('|')[0]}

`; + preface += `
`; preface += 'The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.'; preface += '
'; preface += '
';