jdortiz / website

Content of https://periph.io; automatically updated on commit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Content of https://periph.io; automatically updated on commit

License:Apache License 2.0


Languages

Language:HTML 51.2%Language:CSS 29.7%Language:Shell 19.0%