nipa
1
Dear hugoers, happy Easter!
I am working on my hugo website today after long time and I am a bit rusty.
What I am trying to achieve is to show a custom text/content according to the different tags/ page shown.
So far I’ve tried to create a index.md or _index.md into /content/tags/custom_tag but without success.
Would you mind kindly helping me reminding me how I may get the result, please?
Thank you!
index.md and _index.md mean very different things. Look up Page Bundles (branch and leaf bundles) and the meaning of these files.
You need _index.md here (branch bundle).
It will be helpful if you can share a minimal repo showing your attempt that didn’t work.
nipa
3
What would you write into the _index.md into /content/tags/my-custom-tag/ ?
And how would you refer to the content into the HTML template?
With {{ .Content }}?
EDIT: I solved the problem.
I set a _index.md into my content/tags/my-custom-tag directory:
---
url : "tags/my-custom-tag"
---
My custom content
system
Closed
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.