diff --git a/src/posts/2024-10-19_building-a-blog-with-eleventy.md b/src/posts/2024-10-19_building-a-blog-with-eleventy.md index 180c028..cf7ce9f 100644 --- a/src/posts/2024-10-19_building-a-blog-with-eleventy.md +++ b/src/posts/2024-10-19_building-a-blog-with-eleventy.md @@ -53,7 +53,7 @@ You can think of layouts as re-usable content wrappers. Which is great, since it Eleventy by default looks for layouts in a sub-directory called `_includes`. The naming for layout files is arbitrary, so I just went with a `base.njk` layout that holds all the default boilerplate HTML structure that will be common to all pages on the site. Since I'm using Nunjucks as my templating language for layouts, it offers me some variables inside the HTML and this is what makes this a whole lot more dynamic. -```html +```twig
@@ -97,7 +97,7 @@ Eleventy doesn't really care what the {% raw %}`{{ content }}`{% endraw %} in a Suppose the layout to be chained is called `blogpost.njk` and will receive all the, well, blog posts. It could look something like this: -```html +```twig --- layout: base.njk --- @@ -179,7 +179,7 @@ When using a more complex data structure like this, it's important to note that Until now the site has no styles, which doesn't look particularly pretty. Adding styles isn't very complicated either, though. It's just one line to add to the `base.njk` layout in the page's `` section: -```html +```twig ``` @@ -339,7 +339,7 @@ Most plugins for Eleventy still use CommonJS in their examples, but they're stil Eleventy offers a 1st party navigation plugin. It operates on collections to generate the navigation in templates via filters. The most simple way to add navigation to a site is: -```html +```twig @@ -385,7 +385,7 @@ Now, having just an `