This is a copy of WordPress source plugin (@gridsome/source-wordpress) with wpml support
npm install gridsome-source-wordpress-wpml
yarn add gridsome-source-wordpress-wpml
module.exports = {
plugins: [
{
use: 'gridsome-source-wordpress-wpml',
options: {
baseUrl: 'WEBSITE_URL', // required
apiBase: 'wp-json',
addLanguage: "", // use language code like "de" for single language, array for multiple ["de", "es"]
typeName: 'WordPress',
perPage: 100,
concurrent: 10
}
}
],
templates: {
WordPressPost: '/:year/:month/:day/:slug'
}
}
<page-query>
query{
allWordPressPost {
edges {
node {
title
}
}
}
allWordPressPostDe {
edges {
node {
title
}
}
}
}
</page-query>
This project is licensed under the MIT License - see the LICENSE.md file for details