Another newbie question (how many of these can I have before someone blocks me?)
I have a simple theme. In addition to the default templates (index, single, list) I have created a tags.html and put it in the _default folder.
Then in my content, I have two folders:
posts
tags
The intention is that everything in posts should use the single.html template, which it does.
However I want everything in tags to use the tags.html template. Which it doesn’t.
I understood from the help docs that Hugo would look for the template that matches the name first, and then fall back on single if nothing matching was found?
First question is why you are creating a content folder for tags? Have you looked into taxonomies. Once you answer that, maybe I can help. Would you mind showing us the rest of your source organization as well?
Off the bat, I’m thinking you can just create a template at layouts/tags/single.html, but you are probably doing more work than necessary since Hugo has built-in support for taxonomies.
I know Dropbox seems very convenient right now, but ultimately I’d recommend learning about a basic git flow and putting your code into a proper DVCS (version control). I’m a fan of Atlassian’s tutorials, but you’ll ultimately probably end up using GitHub for your hosted git solution. This is going to make it easier for you to revert to previous versions, run continuous deployment/integration, share code with collaborators (including the good folks in this forum), etc. I know you said you’re a newb, and it’s a lot to take in. If you have the resources, I’d also recommend Git for Humans (or any other book in the ABA series).
theme = "chipButtyBellsOn"
baseurl = "http://replace-this-with-your-hugo-site.com/"
languageCode = "en-uk"
title = "My New Hugo Site"
[taxonomies]
tag = "tags"
Now, in layouts/_default/terms.html use whatever header and footer you want to keep across all your pages, and add something like the following. I’m not saying you need to use this, but it will give you an idea of how taxonomies work:
I will give your example a try. I had already read about taxonomies but was still a bit fuzzy about them.
I think the problem is, the documentation assumes a certain level of knowledge (which is fair enough, most people coming here will have that knowledge). I’ve never used anything like this before - never used Jekyll, never even got into Wordpress or such like. So I need to start with the really basic level of ‘what is a taxonomy and why would you use one’
@StarfallProjects Here is an example of how to call those tags on your homepage (and have them link to the appropriate page) once you’re comfortable with using taxonomies: