Skip to content
Make Your Ghost Blog Beautiful & Make It Fast & Accessible With the New Ghost Theme: Nubia 😍 🎉

Add Custom Tag Description to the jekyll-tagging Plugin

Using the jekyll-tagging Plugin is a great solution to add tags to your Jekyll site as it supports features like a custom tag page and a tag cloud for example. Recently I received a question from one of my valuable customers asking how he can add a tag description to the tag page, so we can have both the tag name and a description, something like in the following screenshot.


The solution that I have reached is to add a list of the currently used tag names with an additional description to the _config.yml file as:

    description: experts description
    description: jekyll description

The next step is to add the following line to the tag_page.html file (I assume you already installed and using jekyll-tagging)

{% assign tag_description = site.custom_tag_description[page.tag] %}

What this line do is to get the description of the current tag page by name and then assign it as a tag_description

Then, we can show the tag description on the same page as:

{{ tag_description.description }}

Hope this tip is useful and if you have any questions or suggestions, please let me know!