pandoc-template

Pandoc Template

Personal framework for building & Encrypting PDF documents from markdown source.

Example

This markdown source generated this PDF Document

Features

Requirements


Get Started

Build all markdown documents to PDFs

make


Encryption

Encrypt documents with aes-256-cbc

make encrypt

these files are created for each PDF document:


Manage keys

By default, the keys are not regenerated if they already exist. To force the generation of new keys, set NEW_KEYS=1.

make encrypt NEW_KEYS=1


Meta-Preprocessor

Use the meta data defined in the document’s header as preprocessor macros.

Lua is evaluated inside the curly braces

---
title: My Document
date: 2024-10-25
author: [ Matias Vazquez-Levi ]
---

**** from 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi in nisl aliquet, ornare eros congue, iaculis dui.


Published on 


Embed Latex

Use latex blocks for more control

ex: include an image without a caption:

::: { .latex }

\includegraphics{./src/assets/frog.png}

:::

When using latex directly, it does not take into account the path of the document.


Copy to static site repository

The DEST variable can be used to copy the encrypted documents to a static site repository.

make encrypt DEST=../my-site

this will copy the documents to the ../my-site/docs folder once they are encrypted.

Make sure your DEST folder is a git repository with the following .gitignore:

docs/**/*.key.sh
docs/**/*.pdf
docs/**/*.csv



License MIT