Home of gjhenrique.com
It uses the built-in publishing management system from org-mode. org-publish-project-alist defines where org-mode should look into to convert org and resource files and the respective folders.
Calling (org-publish-all)
converts the posts from org to HTML and moves the resources, like images and custom JS.
This project includes a .dir-locals.el
file for local development that sets this variable automatically.
This blog uses hugo based on listed theme to generate the static site. It's blazing fast.
The steps using Github Actions are as follows:
- Export the posts from an emacs container containing org-mode, htmlize and packages defining the code coloring
- Calls hugo to create the static site
- Publish the files to Cloudflare Pages With the wrangler tool.
main
branch deploys to production env automatically, and all other branches to preview. Cloudflare Access restricts access to the preview environment.
Creating the CSS file to code snippets follows the process:
- Export the theme file. Use
emacs -q -l /app/export.el -f zezin-generate-themefile
to get the file with the CSS rules. htmlize creates the doom-one theme CSS file by default. - Trim only the posts' CSS rules with purgecss. Call the script
node syntax-extractor
- Override the ones you don't like via _custom.scss
- These CSS rules will style the generated
#+BEGIN_SRC
org sections.
It works with any Emacs theme exportable via htmlize.