Confused on Categories & URL creation

Hey all. I started working on my website again after awhile away and am trying to add categories. However I’m real confused between how it seems to work, and how I want it to work.

How I want it to be is to have a link at the bottom of posts with the singular category that links to a URL that uses the plural “categories” (so relative URL would be /categories/”page-category”). However after fiddling with it I bounce between not having the link show up at all, or only having the singular /category/”page-category” URL.

Of course I figured it out shortly after this post, after banging my head against my desk for days.

Best to share what you did and mark it as the solution.

1 Like

After I switched taxonomies in my config to “category: categories” it now behaves how I wanted it to.

However I’ve run into a related issue. I want to simply output the name of the set category for a page/post in an atom feed. I’m not sure how. Hopefully someone can point the way?

Something like the following, though this doesn’t work?

{{ range .Params.categories }}
<category term=”{{ . }}” />
{{ end }}
1 Like

Try GetTerms. :grin:

This worked, thank you. I now have a fully setup layout for atom feeds.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.