feat(guide): sidebar

This commit is contained in:
iCrawl
2023-04-12 00:39:35 +02:00
parent 731ea5f3cb
commit ee907f32f3
12 changed files with 82 additions and 12 deletions

View File

@@ -17,21 +17,21 @@ export const Content = defineDocumentType(() => ({
type: 'string',
required: true,
},
summary: {
type: 'string',
},
image: {
category: {
type: 'string',
required: true,
},
},
computedFields: {
slug: {
type: 'string',
resolve: (doc) => doc._raw.flattenedPath,
// eslint-disable-next-line unicorn/prefer-string-replace-all
resolve: (doc) => doc._raw.flattenedPath.replace(/\d+-/g, ''),
},
url: {
type: 'string',
resolve: (post) => `/guide/${post._raw.flattenedPath}`,
// eslint-disable-next-line unicorn/prefer-string-replace-all
resolve: (doc) => `/guide/${doc._raw.flattenedPath.replace(/\d+-/g, '')}`,
},
},
}));