Use local built CSS and fonts for master documentation (#1584)

* Change `npm run` to `yarn`

* Export `commander` program if required as module

* Move `prestart` (cli.md generation) to build.js

* Normalize script names

* Change `yarn prestart` to `node lib/build.js`

* Use local built CSS and fonts

* Move stylesheet after the first paragraph

* Remove prestart script
This commit is contained in:
ylemkimon
2018-08-11 08:20:03 +09:00
committed by GitHub
parent d2f56cebd7
commit b99de9ae68
11 changed files with 60 additions and 37 deletions

View File

@@ -116,9 +116,9 @@ sed -i.bak -E '/^\/dist\/$/d' .gitignore
rm -f .gitignore.bak
git add .gitignore dist/
# Edit docs to use CSS from CDN (#1520)
# grep -l '{@stylesheet: static/katex.min.css}' docs/*.md | xargs sed -i.bak \
# 's|{@stylesheet: static/katex.min.css}|<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@./dist/katex.min.css" integrity="sha256-katex.min.css" crossorigin="anonymous"/>|'
# Edit docs to use CSS from CDN
grep -l '{@stylesheet: katex.min.css}' docs/*.md | xargs sed -i.bak \
's|{@stylesheet: katex.min.css}|<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@./dist/katex.min.css" integrity="sha384-katex.min.css" crossorigin="anonymous"/>|'
# Update the version number in CDN URLs included in the README and the documentation,
# and regenerate the Subresource Integrity hash for these files.
@@ -130,9 +130,9 @@ pushd website
yarn run version "${VERSION}"
# Restore docs to use local built CSS
# for file in ../docs/*.md.bak; do
# mv -f "$file" "${file%.bak}"
# done
for file in ../docs/*.md.bak; do
mv -f "$file" "${file%.bak}"
done
USE_SSH=true yarn publish-gh-pages
popd