From 15c7fec46206c6d4ca709a0429809c687bb00e90 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Jun 2024 22:45:55 -0400 Subject: [PATCH] Better solution --- .../adding-content-to-taxonomy-terms/_index.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/content/posts/adding-content-to-taxonomy-terms/_index.md b/content/posts/adding-content-to-taxonomy-terms/_index.md index 087b378..e0a3e2b 100644 --- a/content/posts/adding-content-to-taxonomy-terms/_index.md +++ b/content/posts/adding-content-to-taxonomy-terms/_index.md @@ -40,8 +40,8 @@ content/ blogging-with-quartz/ _index.md ``` -Creating an `//_index.md` is the first step. Here's what I've got so far: -``` {title="content/series/blogging-with-quartz/_index.md"} +Creating an `//_index.md` is the first step. Here's what I've got so far in `content/series/blogging-with-quartz/_index.md`: +``` +++ title = "Blogging with Quartz: a trigonal crystal in a round hole" +++ @@ -49,11 +49,8 @@ title = "Blogging with Quartz: a trigonal crystal in a round hole" this is where i talk about building my blog with quartz ``` -The other half of this setup is modifying the term template. I had to add the `{{ .Content}}` line ( that's really all it took ) so it would render out the body content of my `_index.md` as above. +The other half of this setup is modifying the term template at `layouts/_default/term.html`. I had to add the `{{ .Content}}` line ( that's really all it took ) so it would render out the body content of my `_index.md` as above. -{{< badge >}} -`layouts/_default/term.html` -{{< /badge >}} ```html @@ -82,8 +79,8 @@ The other half of this setup is modifying the term template. I had to add the `{ ### Where does it come from? There was a really confusing issue I had with the title section of the term page. The title was appearing correctly, even pulling from the `_index.md`, but it was being prefixed with `Tag: `. -It took me some digging to find the cause. I started with grepping for `Tag`, and found it in the `i18n/en.toml`. This told me that a template was calling `i18n`, and there we had it: -```html {title="layouts/_default/term.html"} +It took me some digging to find the cause. I started with grepping for `Tag`, and found it in the `i18n/en.toml`. This told me that a template was calling `i18n`, and there we had it in `layouts/_default/term.html` +```html

{{ i18n "tag" }}: {{ .Title }}

``` In practice, I don't think