Building PDFs for Distribution
PDFs are built automatically by the sc2in/policypress GitHub Action on every push. No manual steps are required.
Configurationπ
The following fields in config.toml control PDF output:
[extra]
organization = "Example Co" # appears in footers and on the cover page
logo = "logo.png" # path relative to static/; shown on cover and in headers
pdf_color = "#0e90f3" # hex color for cover page rule and accents
redact = false # default redaction state (overridden by action input)Draft and redacted buildsπ
The action accepts two inputs that override config.toml at build time:
| Input | Effect |
|---|---|
draft_mode: 'true' | Adds a DRAFT watermark to every page |
redact_mode: 'true' | Strips content inside {% redact() %} ... {% end %} shortcode blocks |
To produce a redacted build for auditors alongside the full internal build, trigger the workflow twice via workflow_dispatch - once with redact_mode: false and once with redact_mode: true.
Output filenamesπ
PDFs are named from the policyβs title and most recent version in the front matter:
Acceptable_Use_Policy_-_v1.2.pdf
Acceptable_Use_Policy_(Redacted)_-_v1.2.pdf
Acceptable_Use_Policy_(Draft)_-_v1.2.pdfTechnical detailsπ
PDFs are generated by Typst. PolicyPress parses the markdown in-process with zigmark and emits Typst markup styled after the classic Eisvogel template. Mermaid diagrams are rendered to SVG in-process by pozeiden - no browser or JavaScript runtime is involved, so diagram builds are fast and work on every platform.
Local PDF generationπ
To generate PDFs locally without triggering the action:
nix develop github:sc2in/policypress
policypress -c config.toml -o public
For redacted output:
policypress -c config.toml -o public/redacted --redact