Content of https://periph.io; automatically updated on commit
HTML CSS Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
resources
site
.gitignore
LICENSE
README.md
gen.sh
serve.sh

README.md

periph.io website

Contains all the code necessary to generate https://periph.io via Hugo and serve via Caddy.

The web pages content is located at site/content/. Please send PR as per contributing guidelines.

Running locally

  • ./gen.sh generates the web site in ./www.
  • ./serve.sh serves the website over port 3131.

This requires docker to be installed.

Setup

  • caddy to serve over https
  • docker to be functional and callable from caddy.

The github webhook handler leverages hub.docker.com/r/marcaruel/hugo-tidy/ to do the processing whenever a new commit happens.

hugo-tidy leverages:

  • pygment to generate the syntax highlighting: pip install --user Pygments
  • hugo to generate the html
  • minify to reduce the size: go get -u -v github.com/tdewolff/minify/cmd/minify

The syntax styles was generated with pygmentize -f html -S colorful -a .syntax >> site/static/css/style.css and small modifications.

Latency

The time between a PR being merged and the web site being live is generally <5 seconds. One second due to github's latency itself, 2 seconds to regenerate the web site. The author doesn't like waiting.