gatsby-plugin-i18n-tags

1.0.0 • Public • Published

gatsby-plugin-i18n-tags

Codacy Badge Build Status NPM codecov.io Dependency Status bitHound Score MIT license

Add tags for different languages (i18n) for Gatsby.

Examples

Install

    npm install gatsby-plugin-i18n-tags --save

How to use

  1. Include the plugin in your gatsby-config.js file after gatsby-plugin-i18n.
// in gatsby-config.js
plugins: [
  {
    resolve: 'gatsby-plugin-i18n-tags',
    options: { // Default options
      tagPage: 'src/templates/tag-page.js',
      tagsUrl: '/tags/',
      langKeyForNull: 'any'
    }
  }
]
  1. Add tags prop to your .md files
    ---
    title: Your awesome title
    tags:
      - Linux
      - Arch
    ---
  1. Query!
  {
    allMarkdownRemark{
      edges{
        node{
          frontmatter{
            title
          }
          fields{
            tagSlugs {
              tag
              link
            }
          }
        }
      }
    }
  }

Dependencies (3)

Dev Dependencies (16)

Package Sidebar

Install

npm i gatsby-plugin-i18n-tags

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

20.5 kB

Total Files

13

Last publish

Collaborators

  • angeloocana