static site generator based on pandoc
| example | ||
| .editorconfig | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| pssg | ||
| README.md | ||
| TODO.md | ||
pandoc static site generator
a shell script for creating static websites from markup file formats supported by Pandoc.
it's derived from the makefiles originally written for cyberia.club and layerze.ro, which are now being converted to use this.
SETUP
- install Pandoc
- copy
example/or start a new folder for your site with this structure:
site/
base.html
metadata.yaml
pages/
index.md
static/
theme.css
- everything under
pages/is rendered throughbase.html, and everything instatic/is copied over - you can put YAML metadata at the top of pages, and stuff from
metadata.yamlwill be included in all pages. see Pandoc's documentation. - the final site will go in
build/
USAGE
run pssg --help to show command-line options.
One-shot
you can specify one or more site paths as positional arguments, or you can list them one per line in a file given with -s or --sites-file. otherwise it will look for sites.txt in the current directory.
On git updates
- clone your website source repositories somewhere.
- put absolute paths to them in a sites file (see one-shot usage section).
- put the following in
/etc/cron.d/pandoc-ssg:
* * * * * root /path/to/pandoc-ssg/pssg --ci --sites-file /path/to/sites.txt
- point your webserver (nginx, caddy, etc.) to
build/inside each site.
Watch for changes (not working yet)
1. install entr
2. pass the flag -w or --watch (can't be used with --ci)
LICENSE
CC-BY-SA 4.0 International - Cyberia Computer Collective