I just started playing around with Hugo and so far it seems pretty awesome
I would like my blog to be separate from the rest of the site. So the idea is that the blog would be accessible via /blog, which I have managed to do by renaming the post directory to blog.
However, I can not seem to figure out how to make taxonomies (Iām interested in categories and tags at the moment) to appear under /blog as opposed to under /. So, I would like Hugo to place categories under /blog/categories (instead of /categories) and tags under /blog/tags (instead of /tags).
Setting blog as a language does sound hackish indeed. Iām guessing it would cause issues if I wanted to actually use languages later down the line.
I can probably have a URL rewrite for this on the server-side, but that partially defeats the purpose of a static blog, not to mention that things would break on localhost.
Aside from the linked GitHub issue there any other place I could suggest an implementation of this feature? Iām sure something like this would be useful to folks looking to move non-blog sites from CMSs like WordPress and Jekyll.
I forgot to mention that I tried that suggestionā¦ I got the following error when I tried that suggestion ā ERROR 2017/04/05 22:14:46 0 : template: theme/_default/summary.html:6: bad character U+002F '/'.
My Hugo version is as follows ā Hugo Static Site Generator v0.19 darwin/amd64 BuildDate: 2017-02-27T11:21:29+01:00
Actuallyā¦ I managed to get this to work (still new to the templates syntax!).
I understand this is somewhat of a hack, but for lack of a better solution, as a new user, it would have been useful for this to be documented in the main Hugo docs.
It seems like there is a new documentation effort by @rdwatters underway (great work btw!) ā Perhaps this trick could be mentioned somewhere to give new users looking for something like this a head start?
No, I didnāt need to change anything, I just had a silly syntax error!
FWIW, just in case itās of use to anyone, to make this less āuglyā, you can use YAML in your frontmatter instead of TOML to avoid the weird quotes around blog/tags in frontmatter (itās awesome that Hugo is so flexible in this regard).