This commit is contained in:
hamdy
2020-11-26 14:04:14 +02:00
parent 99a19fb63b
commit fcc2a18721
12 changed files with 503 additions and 79 deletions

View File

@@ -86,7 +86,7 @@ module.exports = {
typeName: 'Blog',
path: './content/blog/**/*.md',
templates: {
BlogPost: '/news/:id'
BlogPost: '/blog/post/:id'
},
refs: {
author: 'Person',
@@ -98,6 +98,25 @@ module.exports = {
}
},
{
use: '@gridsome/source-filesystem',
options: {
typeName: 'News',
path: './content/news/**/*.md',
templates: {
NewsPost: '/news/:id'
},
refs: {
author: 'Person',
tags: {
typeName: 'Tag',
create: true
}
}
}
},
{
use: '@gridsome/source-filesystem',
options: {
@@ -131,8 +150,13 @@ module.exports = {
},
templates: {
Blog: [{
path: '/blog/post/:id'
}],
News: [{
path: '/news/:id'
}],
Person: [{
path: '/people/:id',
component: '~/templates/Person.vue'