I seek to add tags and categories to the default blogdown theme (hugo-lithium theme).
As a first step, config.toml is configured to include Categories and Tags links in the theme's main menu:
[[menu.main]]
name = "Categories"
url = "/categories/"
weight = 2
[[menu.main]]
name = "Tags"
url = "/tags/"
weight = 3
Clicking the Categories link displays:
Index of ./categories/
Name Size Date Modified
./ 2017-09-15 09:55:53
../ 2017-09-16 22:03:12
r/ 2017-09-15 09:55:53
index.xml 695 B 2017-09-17 14:25:01
Clicking the Tags links displays:
Index of ./tags/
Name Size Date Modified
./ 2017-09-15 15:31:46
../ 2017-09-16 22:03:12
aws/ 2017-09-15 15:31:46
openemr/ 2017-09-15 15:31:46
plot/ 2017-09-15 09:55:53
r-markdown/ 2017-09-15 09:55:53
regression/ 2017-09-15 09:55:53
index.xml 1,199 B 2017-09-17 14:36:01
A better user experience is sought for manipulating the bog via Categories and Tags. I know it exists as I've seen it in other themes.
I understand the problem to be that the template for taxonomies (terms.html) is not in the theme, so the index pages will not be generated (eg, tags/index.html).
How would one go about adding the template for taxonomies (terms.html) to the theme for a reasonable user for subsetting blog posts listings by categories and tag?
For the record, this question has been cross-posted on Github .
The hugo-lithium-theme does not have the template for taxonomies ( terms.html
), so the index pages will not be generated (eg, tags/index.html
). If you want to add it, I recommend you to spend some time on learning more about Hugo themes and templates in the blogdown book: https://bookdown.org/yihui/blogdown/templates.html , and add the template terms.html
to the _default/
folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.