static site generator based on pandoc
Find a file
2025-12-22 13:16:52 -06:00
example clean up docs, add pre/post-build script support 2025-12-22 13:16:52 -06:00
.editorconfig tried to add a --watch option 2025-10-20 15:04:49 -05:00
.gitignore clean up docs, add pre/post-build script support 2025-12-22 13:16:52 -06:00
flake.lock add --format argument 2025-11-07 14:39:33 -06:00
flake.nix clean up docs, add pre/post-build script support 2025-12-22 13:16:52 -06:00
pssg clean up docs, add pre/post-build script support 2025-12-22 13:16:52 -06:00
README.md clean up docs, add pre/post-build script support 2025-12-22 13:16:52 -06:00
TODO.md update docs, organize code 2025-12-07 12:54:46 -06:00

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

  1. install Pandoc
  2. 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 through base.html, and everything in static/ is copied over
  • you can put YAML metadata at the top of pages, and stuff from metadata.yaml will 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

  1. clone your website source repositories somewhere.
  2. put absolute paths to them in a sites file (see one-shot usage section).
  3. put the following in /etc/cron.d/pandoc-ssg:
  * * * * * root /path/to/pandoc-ssg/pssg --ci --sites-file /path/to/sites.txt
  1. 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