brew install hugo
npm i
npm start
brew install mkcert
# Generate the certs
mkcert localhost 127.0.0.1 ::1
# Install the certs into the system
mkcert -install
Server:
npm run build
npm run serve:prod
npm run build
Steps (from package.json
):
- build the sidebar html fragment with the
sitemap-tree-generator.js
script - interpolate the application colors with the
palette-generator
script, also transform the JS colors to css vars usingbulma-css-vars
- create the site scripts with webpack, read
webpack.common.js
, write the output todist/
- build the static files, write the output to
dist/
Manual steps in Netlify (setup done only once)
- Configure the DNS redirects
- Configure the site root directory to
dist/
- Hugo (static pages)
- Webpack (tooling)
- d3, React (browser)
from within a page, path to itself:
/{{ .File.Dir }}{{ .File.ContentBaseName }}/
From mmark to goldmark:
- replace extension from
mmark
tomd
find . -depth -name "*.mmark" -exec sh -c 'mv "$1" "${1%.mmark}.md"' _ {} \;
- Perform some text replacements
# inline math
find: \$\$([^\s].*?)\$\$
replace: \$$1\$
# block math
find: \$\$([\s\S]*?)\$\$
replace: <div>\n\$\$$1\$\$\n</div>
# block math to live template:
find: <div>\s+\$\$
replace: <div>\$\$
find: \$\$\s+</div>
replace: \$\$</div>