static site generator based on pandoc
Find a file
2025-10-20 15:04:49 -05:00
example add CI mode for cronjob, add nix flake, update example site 2025-10-15 11:42:54 -05:00
.editorconfig tried to add a --watch option 2025-10-20 15:04:49 -05:00
.gitignore tried to add a --watch option 2025-10-20 15:04:49 -05:00
flake.lock edit extras, add --sites-file support 2025-10-15 21:39:52 -05:00
flake.nix tried to add a --watch option 2025-10-20 15:04:49 -05:00
pssg tried to add a --watch option 2025-10-20 15:04:49 -05:00
README.md tried to add a --watch option 2025-10-20 15:04:49 -05:00
sites.txt tried to add a --watch option 2025-10-20 15:04:49 -05:00
TODO.md tried to add a --watch option 2025-10-20 15:04:49 -05:00

pandoc static site generator

this is a shell script for creating static websites from Markdown files using Pandoc.

it's derived from the makefiles originally written for cyberia.club and layerze.ro, which this will eventually be used for and probably queercoded.xyz too.

USAGE

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
  • stuff in metadata.yaml is included with all pages
  • the final site will go in build/

Running once

you can specify one or more site paths as command-line arguments:

pssg /path/to/site /path/to/another/site

you can instead list them one per line in a file passed after -s or --sites-file. otherwise it will use sites.txt in this directory.

Running with a Cronjob

  1. put paths to your site(s) separated by newlines in a sites file (see above).
  2. point your webserver (nginx, caddy) to build/ inside each site.
  3. put the following in /etc/cron.d/pandoc-ssg:
          • root /path/to/pandoc-ssg/pssg --ci
      
      

Watch for changes

1. install entr 2. pass the flag -w or --watch (can't be used with --ci) not available yet

LICENSE

CC-BY-SA 4.0 International - cyberia computer club