From 2607baf456ea7e90a471aec2ab0a7daaef1b0dab Mon Sep 17 00:00:00 2001 From: hamdy Date: Sun, 8 Nov 2020 13:03:30 +0200 Subject: [PATCH] using ids instead of titles --- gridsome.config.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gridsome.config.js b/gridsome.config.js index 987df36e1..162b5f2a2 100644 --- a/gridsome.config.js +++ b/gridsome.config.js @@ -42,6 +42,9 @@ module.exports = { options: { typeName: 'Blog', path: './content/blog/**/*.md', + templates: { + BlogPost: '/blog/:id' + }, refs: { author: 'Author', tags: { @@ -70,18 +73,18 @@ module.exports = { }, templates: { Blog: [{ - path: '/blog/:title' + path: '/blog/:id' }], Category: [{ - path: '/category/:title', + path: '/category/:id', component: '~/templates/Category.vue' }], Author: [{ - path: '/author/:name', + path: '/author/:id', component: '~/templates/Author.vue' }], Tag: [{ - path: '/tags/:title', + path: '/tags/:id', component: '~/templates/Tag.vue' }], }