# A way to create "traditional" cagegories, tags for blog posts

**URL:** <https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784>\
**Category:** Support\
**Created:** [February 14, 2021, 7:35pm UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784 "2021-02-14T19:35:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murk](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@Murk](https://zola.discourse.group/u/Murk)\
**Post date:** [February 14, 2021, 7:35pm UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/1 "2021-02-14T19:35:14Z")

</div>

Hello, I have just started looking into taxonomies, but the goal I have is to replicate a simple category, tag on a blog site. There are two things I would like to achieve:

1. Disable the taxonomy pages, e.g. `$TAXONOMY_NAME/list.html`
2. Embed categories and or tags in the blog post template - for example as a top banner, or side panel etc.

I haven’t yet discovered anything in the documentation that might let me do the above. Is there some information on this, or should I instead look at the Zola source directly?

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [February 15, 2021, 10:38am UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/2 "2021-02-15T10:38:48Z")

</div>

1. I don’t know a mechanism to disable list of taxonomy inside Zola, but you can add redirect with 301 or 302 on your webserver

2. 

```auto
{% if page.taxonomies.tags %}
<ul>
        {% for tag in page.taxonomies.tags %}
        <li><a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}" itemprop="url">#{{ tag }}</a></li>{% if page.taxonomies.tags | length > 1 %}{% if loop.index != page.taxonomies.tags | length %},{% endif %}
        {% endif %}
        {% endfor %}
<ul>
        {% endif %}

```

---

<div class="post-metadata">

**Author:** ![Murk](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@Murk](https://zola.discourse.group/u/Murk)\
**Post date:** [February 15, 2021, 11:14pm UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/3 "2021-02-15T23:14:13Z")

</div>

Thank you. I see how that works, I think, I will experiment with it further. Perhaps what I was asking for didn’t make complete sense. (point #1)

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [February 16, 2021, 8:39am UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/4 "2021-02-16T08:39:37Z")

</div>

About point 1, it depends of where your website will be hosted. if you control your nginx\apache\thenewonemodernwebserver settings - you could easily handle redirect from _[http://company.com/tags](http://company.com/tags)_ to where you want.

---

<div class="post-metadata">

**Author:** ![zeph](https://avatars.discourse-cdn.com/v4/letter/z/85e7bf/32.png) [@zeph](https://zola.discourse.group/u/zeph)\
**Post date:** [February 18, 2021, 7:08pm UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/5 "2021-02-18T19:08:31Z")

</div>

Hey @Murk !

When I was messing around trying to put categories/tags in my own blog post template, I found the [DeepThought theme](https://www.getzola.org/themes/deepthought/) VERY helpful, as they have a github and a live site that are basically in sync. So I could click around on the site (e.g. tags shown at top of post [here](https://deepthought-theme.netlify.app/posts/post-11/)) and then find the code/markdown/template/macro that corresponded to it (for the previous example, [here](https://github.com/RatanShreshtha/DeepThought/blob/6bc44df307ab8f03c31ffe3ca99421072ec6f8bd/templates/macros.html#L92-L117), [here](https://github.com/RatanShreshtha/DeepThought/blob/6bc44df307ab8f03c31ffe3ca99421072ec6f8bd/templates/base.html#L1), and [here](https://github.com/RatanShreshtha/DeepThought/blob/6bc44df307ab8f03c31ffe3ca99421072ec6f8bd/templates/page.html#L24-L33) are relevant).

I suspect this learning approach would work with other themes too, but I haven’t personally tried it.

Good luck, have fun!

-Z

---

<div class="post-metadata">

**Author:** ![Murk](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@Murk](https://zola.discourse.group/u/Murk)\
**Post date:** [February 18, 2021, 8:28pm UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/6 "2021-02-18T20:28:48Z")

</div>

Thank you Zeph. I will take a look at that one. I think I will be able to achieve what I was after.

---

<div class="post-metadata">

**Author:** ![southerntofu](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/southerntofu/32/189_2.png) [@southerntofu](https://zola.discourse.group/u/southerntofu)\
**Post date:** [February 19, 2021, 1:59am UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/7 "2021-02-19T01:59:19Z")

</div>

> [@zeph](#):
>
> I suspect this learning approach would work with other themes too

I personally go a little step further. All the sites i maintain with my homegrown theme display in the footer a link to the actual page source. Examples:

- [my blog](https://staticadventures.netlib.re/)
- [a french-speaking tilde server](https://fr.tild3.org/)
- [joinjabber.org](https://joinjabber.org/)

Thanks for reminding me, i had forgotten to add info about it in the [theme README](https://tildegit.org/southerntofu/zola-water#page-sources). The theme is not ready yet to be published, but i’m interested to have feedback about it or the README if you find time to contribute criticism 😉

---

<div class="post-metadata">

**Author:** ![zeph](https://avatars.discourse-cdn.com/v4/letter/z/85e7bf/32.png) [@zeph](https://zola.discourse.group/u/zeph)\
**Post date:** [February 19, 2021, 3:31am UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/8 "2021-02-19T03:31:56Z")

</div>

@southerntofu That is very snazzy, thanks for the links! I don’t have a ton of time to look at things in detail at the moment, but I may nab your “link to code in footer” idea in the future.

---

<div class="post-metadata">

**Author:** ![southerntofu](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/southerntofu/32/189_2.png) [@southerntofu](https://zola.discourse.group/u/southerntofu)\
**Post date:** [February 19, 2021, 12:30pm UTC](https://zola.discourse.group/t/a-way-to-create-traditional-cagegories-tags-for-blog-posts/784/9 "2021-02-19T12:30:14Z")

</div>

> [@zeph](#):
>
> I may nab your “link to code in footer” idea in the future.

Oh please do! It’s not “my” idea to begin with. I don’t remember where i got it from, but i saw people doing that with a static site (while i thought only wikis did that), which made me think i should do it myself, and also made me question the whole website/wiki dichotomy (they’re not that different and given proper tooling a static site can be a very good wiki).
