Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

@mdotasia/gatsby-plugin-tags

This plugin adds tagging support to your blog created with plugin @mdotasia/gatsby-plugin-blog. All you have to do is add an optional tags array to the frontmatter of blog posts. The plugin generates for each tag an array of posts with all blog posts that were tagged with this tag, sorted by date in descending order. This is handed over to a user provided template.

Installation

yarn add @mdotasia/gatsby-plugin-tags

Configuration

Add @mdotasia/gatsby-plugin-tags to plugins. This snippet shows the configuration:

{
  resolve: "@mdotasia/gatsby-plugin-tags",
  options: {
    template: `${__dirname}/src/templates/post.jsx`
  }
}

This plugin has the following options:

Option Default Description
template You need to create your own template for tag pages. Your template receives path and a context object with a posts array and the tag.
Docs
Tutorials
Plugins
Blog
Showcase