Add Post Tags to Homepage


For blogs that use tags as categories for their posts, it can be beneficial to have the tags listed alongside the post on the home page. You can use the {{tags}} helper to show all of the tags for each post.

So, inside your index.hbs file, you can add in the {{tags}}. Here is an example of how Capser uses this feature:

The code above will output all of the tags separated by a comma and a space. The separation between the tags is customizable (ex. {{tags separator=" | "}}). You can fill in really whatever you want as the separator.

If you only want to show the tags div when there are tags there, you can use an if statement:

{{#if tags}}
	<div class="tags">{{tags}}</div>
{{/if}}

There are a few other customizations for {{tags}} that you can check out here.