From 61f673442c07c125bc3525b042b2c536ff49fe1e Mon Sep 17 00:00:00 2001 From: Marie Katrine Ekeberg Date: Tue, 22 Oct 2024 19:55:36 +0200 Subject: [PATCH] Add more raw specifiers to make jekyll not work on specific regions --- org/_posts/2024-10-22-how_i_blog_with_emacs.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/org/_posts/2024-10-22-how_i_blog_with_emacs.org b/org/_posts/2024-10-22-how_i_blog_with_emacs.org index ebffa55..166753f 100644 --- a/org/_posts/2024-10-22-how_i_blog_with_emacs.org +++ b/org/_posts/2024-10-22-how_i_blog_with_emacs.org @@ -156,6 +156,7 @@ After covering the Emacs part above, you would probably guess that the rest of t In addition to the above, I also have some additional tooling in place. The pipeline ends up as: +{% raw %} #+BEGIN_SRC yaml name: Jekyll site CI @@ -224,7 +225,7 @@ In addition to the above, I also have some additional tooling in place. The pipe uses: actions/deploy-pages@v4 #+END_SRC - +{% endraw %} There are a few small things here you might be puzzled at. Doesn't Github Pages have built-in support for Jekyll? Then why do I need to do all this extra setup Ruby stuff?? That is because I want more control. I use some plugins (covered in a few sections) and also a script that minifies the HTML. Running Jekyll myself, as well as doing more setup, gives me more control of the process. If you wanted a more simple sites without any Ruby plugins, you could just use the built in support from Github with a far simpler pipeline. @@ -304,6 +305,7 @@ It is used for the pagination plugin (to get multiple pages of blog posts), to g ** Creating pages to show posts with a specific tag To create tag pages, I just make a simple HTML layout in Jekyll. Like all other pages, we can give metadata in a header that the layout can read. In other words, we simply need to generate pages like the following, and Jekyll will take care of the rest: +{% raw %} #+BEGIN_VERSE --- title: "Tag: emacs" @@ -311,11 +313,13 @@ layout: tag tag: emacs --- #+END_VERSE +{% endraw %} (example is from the pages tagged with the Emacs tag) If you have ever written a bash script before, you will probably figure out this one quite easily. We simply parse all the posts, filter unique tags, then make a page like the above for each tag. +{% raw %} #+BEGIN_SRC bash #!/bin/bash @@ -331,6 +335,7 @@ If you have ever written a bash script before, you will probably figure out this fi done #+END_SRC +{% endraw %} This time you will probably have a harder time guessing how the HTML layout page looks. After all, what are we supposed to do there? If you think about it for a while, it is not that hard. We have the tag from the metadata, so we simply need to parse the Jekyll array structures and filter the posts that have the tag we are looking for. Fortunately, Jekyll keeps an array/list with all posts for a given tag: