mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
Move to Netlify (#1683)
* Remove GitHub Pages publish script * Redirect katex.netlify.com to katex.org * Redirect function-support using _redirects * Redirect docs to the first documentation and docs/en/ to docs/ * Include HSTS includeSubDomains and preload directive * Cache static image assets
This commit is contained in:
17
release.sh
17
release.sh
@@ -209,23 +209,6 @@ else
|
|||||||
# Fallback to npm publish, if yarn cannot authenticate, e.g., 2FA
|
# Fallback to npm publish, if yarn cannot authenticate, e.g., 2FA
|
||||||
yarn publish --new-version "$VERSION" || npm publish
|
yarn publish --new-version "$VERSION" || npm publish
|
||||||
|
|
||||||
# Publish the website
|
|
||||||
# If gh-pages branch is protected, push to another branch
|
|
||||||
pushd website
|
|
||||||
PUBLISH_GH_PAGES=$(USE_SSH=true yarn publish-gh-pages 2>&1 | tee /dev/tty || true)
|
|
||||||
if echo "$PUBLISH_GH_PAGES" | grep -qEi 'GH006|protected branch'; then
|
|
||||||
pushd build/KaTeX-gh-pages
|
|
||||||
git checkout -B "v$VERSION-gh-pages"
|
|
||||||
git push -u origin "v$VERSION-gh-pages"
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "GitHub pages branch is protected."
|
|
||||||
echo "Create a pull request against gh-pages from 'v$VERSION-gh-pages'"
|
|
||||||
echo "Visit https://github.com/Khan/KaTeX/pulls to open a pull request."
|
|
||||||
fi
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "The automatic parts are done!"
|
echo "The automatic parts are done!"
|
||||||
echo "Now all that's left is to create the release on GitHub."
|
echo "Now all that's left is to create the release on GitHub."
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node lib/build.js && docusaurus-start",
|
"start": "node lib/build.js && docusaurus-start",
|
||||||
"build": "node lib/build.js && docusaurus-build",
|
"build": "node lib/build.js && docusaurus-build",
|
||||||
"publish-gh-pages": "node lib/build.js && docusaurus-publish",
|
|
||||||
"write-translations": "docusaurus-write-translations",
|
"write-translations": "docusaurus-write-translations",
|
||||||
"version": "node lib/build.js && docusaurus-version",
|
"version": "node lib/build.js && docusaurus-version",
|
||||||
"rename-version": "docusaurus-rename-version"
|
"rename-version": "docusaurus-rename-version"
|
||||||
|
5
website/static/_headers
Normal file
5
website/static/_headers
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
|
||||||
|
|
||||||
|
/img/*
|
||||||
|
Cache-Control: public, max-age=31536000
|
6
website/static/_redirects
Normal file
6
website/static/_redirects
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
https://katex.netlify.com/* https://katex.org/:splat 301!
|
||||||
|
|
||||||
|
/function-support.html /docs/supported.html 301
|
||||||
|
|
||||||
|
/docs/en/* /docs/:splat 301
|
||||||
|
/docs /docs/node.html 301
|
@@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Function Support in KaTeX</title>
|
|
||||||
<meta http-equiv="refresh" content="0;URL='./docs/supported.html'" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>This page has moved to the <a href="./docs/supported.html">documentation</a>.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user