Better solution

drafts
unknown 5 months ago
parent 933926baaa
commit 15c7fec462

@ -40,8 +40,8 @@ content/
blogging-with-quartz/ blogging-with-quartz/
_index.md _index.md
``` ```
Creating an `<taxonomyType>/<taxonomyItem>/_index.md` is the first step. Here's what I've got so far: Creating an `<taxonomyType>/<taxonomyItem>/_index.md` is the first step. Here's what I've got so far in `content/series/blogging-with-quartz/_index.md`:
``` {title="content/series/blogging-with-quartz/_index.md"} ```
+++ +++
title = "Blogging with Quartz: a trigonal crystal in a round hole" 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 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 ```html
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Lang }}"> <html lang="{{ .Lang }}">
@ -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? ### 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: `. 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: 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 {title="layouts/_default/term.html"} ```html
<h1>{{ i18n "tag" }}: {{ .Title }}</h1> <h1>{{ i18n "tag" }}: {{ .Title }}</h1>
``` ```
In practice, I don't think In practice, I don't think

Loading…
Cancel
Save