Hi!
I’m creating a website from scratch using Hugo, without any pre-defined themes, and I need to edit the /tags page, but I don’t have any .html file for it. What should I do to customize this page?
Thanks
Hi!
I’m creating a website from scratch using Hugo, without any pre-defined themes, and I need to edit the /tags page, but I don’t have any .html file for it. What should I do to customize this page?
Thanks
What does this mean?
Do you want to add content to the page that lists all the tags?
Do you want to change the structure of the the page that lists all the tags?
Do you want to change the structure of the the page that lists all the pages associated with a particular tag?
Create /layouts/tags/list.html
in your theme. This will be the list template for your tags, for example, site.com/tags/something/
and all articles/posts with that tag will show up in there.
/content/tags/_index.md
will be used to edit the front end markdown for the /tags, put any frontmatter there for if anyone goes to site.com/tags
/content/tags/something/_index.md
will be used to edit the frontend/frontmatter markdown for the something
tag.
I’m sure the resident experts can advise more, but this is what I use on my site.
That worked perfectly. Thank you!
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.