Defining a taxonomy in toml

97 views
Skip to first unread message

Adrian Simmons

unread,
Sep 17, 2014, 10:32:22 AM9/17/14
to hugo-d...@googlegroups.com
Anyone have an example of defining a taxonomy and term in toml docs only have yaml:
http://hugo.spf13.com/taxonomies/usage/

Which is not so helpful when you have config.toml

Adrian Simmons

unread,
Sep 17, 2014, 10:35:58 AM9/17/14
to hugo-d...@googlegroups.com
So far I have:
[[taxonomies]]
    oggetto = "oggetti" 

Which doesn't throw errors. But how do I add terms?

Adrian Simmons

unread,
Sep 17, 2014, 11:21:25 AM9/17/14
to hugo-d...@googlegroups.com
Oh, terms are added only via content?

Excuse the list noise.

Adrian Simmons

unread,
Sep 17, 2014, 11:59:54 AM9/17/14
to hugo-d...@googlegroups.com
Except that terms 404 unless I use 'categories/term' not oggetti as defined...no way to rename 'categories'? Probably doesn't really matter in my final site. Just trying to understand how to define a taxonomy – am I reading the docs right? You can have either categories or tags, but can't yet create your own top level?

Nate Finch

unread,
Sep 17, 2014, 12:18:59 PM9/17/14
to Adrian Simmons, hugo-d...@googlegroups.com
you want [taxonomies] not [[taxonomies]]

That's the problem.

Check out:


On Wed, Sep 17, 2014 at 11:59 AM, Adrian Simmons <adr...@gmail.com> wrote:
Except that terms 404 unless I use 'categories/term' not oggetti as defined...no way to rename 'categories'? Probably doesn't really matter in my final site. Just trying to understand how to define a taxonomy – am I reading the docs right? You can have either categories or tags, but can't yet create your own top level?

--
Hugo
 
A Fast and Flexible Static Site Generator built with love by spf13 and friends in Go
 
Download the latest at https://github.com/spf13/hugo/releases
---
You received this message because you are subscribed to the Google Groups "Hugo Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugo-discuss...@googlegroups.com.
To post to this group, send email to hugo-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/hugo-discuss.
For more options, visit https://groups.google.com/d/optout.

Nate Finch

unread,
Sep 17, 2014, 3:47:18 PM9/17/14
to Adrian Simmons, hugo-d...@googlegroups.com
Oh, also, tags and categories are *examples* of taxonomies.  That's part of the confusion.  You don't need categories or tags at all, though they are used by some themes by default.

Adrian Simmons

unread,
Sep 18, 2014, 7:43:43 AM9/18/14
to hugo-d...@googlegroups.com, adr...@gmail.com
Thanks. Tripped up by a simple syntax error *again*. Red face. Contemplating ignoring toml and using yaml instead, I'm a bit more familiar with that...


On Wednesday, 17 September 2014 20:47:18 UTC+1, Nate Finch wrote:
Oh, also, tags and categories are *examples* of taxonomies.  That's part of the confusion.  You don't need categories or tags at all, though they are used by some themes by default.
I wasn't confused about that initially, I *expected* to be able to name my own taxonomy, only confused when it didn't seem to work :) 

All working as expected now, thanks.

loads...@gmail.com

unread,
Sep 18, 2014, 8:01:50 PM9/18/14
to hugo-d...@googlegroups.com, adr...@gmail.com

.toml's the bomb. I can never return [to .yaml].

#AllHailHugo
Reply all
Reply to author
Forward
0 new messages