Single source publishing project using Eleventy and PagedJS.
A deploy is running here: lathu.langmai.org
The media archive (5.5GiB) is required but not part of this repository. Please request it from the Newsletter team and extract it via:
tar -xf LTLM_2024_2023_and_2022_Media_Archive.tar
Then run ./setup.sh
Run npm start
and browse to http://localhost:8080/.
node generatePDF.js
npm run deploy
-
PagedJS documentation & quick solution & fix to layout problems
-
Designing For Print With CSS - Rachel Andrew in Smashing Magazine
-
Une chaîne de publication collaborative et multisupport pour le musée Saint-Raymond (French article that describes a similar workflow. Very readable with Google translate. Source code available.)
- Eleventy Image processing is not parallel.
- Sometimes paragraphs (and images) do not break correctly to the next page. See src/media/documentation/BugTextFragment.webp. The fragment ends up in the top right corner (or outside) of the page.
- The pages with the fade-in gradients over the background images crash Adobe Reader, but only if they had been compressed before with Ghostscript; the uncompressed original works fine! In other words, there is something Ghostscript adds in the compression of those pages that cause the crash. I confirmed that it does not depend on the number of stops of the linear-gradient. It also does not depend on the whether or not I use PDF version 1.7 or 1.5.
Bulk conversation from source ODT (or DOCX...) to Markdown using Pandoc
for i in *.odt
do
pandoc --from odt --to markdown --wrap=none -i "$i" -o "${i%odt}md"
done
VS Code allows for regex replace submatch, e.g.: ([a-zA-Z])" > $1”
- Sr > Sr.
- Br > Br.
-
(replace double spaces)
-
–
- ... > …
- ... > …
- ' > ’
- ' > ’ (a pandoc markdown conversion thing)
- " > “”
- "([\p{Letter}]) > “$1
- ”. > .”
- **(.*)** > ## $1
- file:///media/data/dev/newsletter/src/media/originals/(.*) > {% image "$1" %}
/media/data/dev/newsletter/src/media/originals/article2024 find * | grep -i "Done" | grep -E -i "jpg|jpeg|png" | grep -v "/." find -iname ".*" -delete find -iname ".DS_Store" -delete