gatsby-plugin-yaml-i18n
v0.2.1
Published
YAML and Markdown based i18n for gatsby
Downloads
7
Readme
gatsby-plugin-yaml-i18n
A YAML-based i18n plugin for gatsby.
This plugin provides an flexible, scalable and developer-friendly approach to i18n in gatsby projects.
Setup
To start from scratch, install the starter project (demo):
gatsby new https://github.com/hitchcott/gatsby-starter-yaml-i18n
To implement in your existing project:
npm i gatsby-plugin-yaml-i18n
module.exports = {
plugins: [
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/content`,
name: 'yaml-i18n-content'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/templates`,
name: 'yaml-i18n-templates'
}
},
{
resolve: 'gatsby-plugin-yaml-i18n',
options: {
locales: ['en']
}
}
]}
}
Examples
- See https://github.com/hitchcott/gatsby-starter-yaml-i18n for a basic implementatiosn
- See https://github.com/ethereumclassic/ethereumclassic.github.io for an in depth implementation.
Documentation
Detailed documentation is to come. Sorry! See the examples for now.