DocFrame is a lightweight framework for building styled HTML and PDF documents from Markdown using Pandoc. It provides a consistent set of templates, styles, and a reusable GitHub Actions workflow.
- Reusable Pandoc HTML + LaTeX templates
- Base CSS styling for web output
- Shell build script for local builds
- Reusable GitHub Actions workflow for automated builds
To use DocFrame in another repository:
git submodule add https://github.com/tobiaslocker/docframe.git
git submodule update --init --recursiveCreate a workflow in your project (e.g. .github/workflows/build.yml):
name: Build Document
on:
push:
branches: [ main ]
jobs:
build:
uses: tobiaslocker/docframe/.github/workflows/build-workflow.yml@main
with:
md_file: src/index.md
metadata_file: src/metadata.yaml| Event | Artifact Type | Retention | Deployment |
|---|---|---|---|
| push | Temporary | 3 days | Not deployed |
| release (published) | Persistent | Permanent | HTML deployed to GitHub Pages |
In short:
- Regular pushes are great for previewing or testing document builds.
- Publishing a release will generate and upload permanent artifacts and automatically deploy your HTML output to GitHub Pages.
You can also build locally without GitHub Actions:
./docframe/scripts/build.sh path/to/markdown.mdEnsure Pandoc and XeLaTeX are installed on your system.