Personal framework for building & Encrypting PDF documents from markdown source.
This markdown source generated this PDF Document
./src/**/*.md
–> ./docs/**/*.pdf
)pandoc
texlive
xelatex
openssl
(for encryption only)Build all markdown documents to PDFs
make
Encrypt documents with aes-256-cbc
make encrypt
these files are created for each PDF document:
docs/document.enc
The encrypted PDF document as a base64 stringdocs/document.key.sh
The key to decrypt the document (Autogenerated, but can be changed by modifying the Password settings in the Makefile)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
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
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.
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