chore(guide): bring guide up to speed

This commit is contained in:
iCrawl
2023-04-09 12:41:02 +02:00
parent bfee6c8d88
commit 3d2f4b405e
39 changed files with 1542 additions and 969 deletions

View File

@@ -6,6 +6,7 @@ import { defineDocumentType, makeSource } from 'contentlayer/source-files';
// import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import codeHikeThemeDarkPlus from './src/styles/code-hike-theme-dark-plus.json';
export const Content = defineDocumentType(() => ({
name: 'Content',
@@ -30,7 +31,7 @@ export const Content = defineDocumentType(() => ({
},
url: {
type: 'string',
resolve: (post) => `/posts/${post._raw.flattenedPath}`,
resolve: (post) => `/guide/${post._raw.flattenedPath}`,
},
},
}));
@@ -67,7 +68,7 @@ export default makeSource({
contentDirPath: 'src/content',
documentTypes: [Content],
mdx: {
remarkPlugins: [remarkGfm, [remarkCodeHike, { theme: 'css-variables', lineNumbers: true }]],
remarkPlugins: [remarkGfm, [remarkCodeHike, { theme: codeHikeThemeDarkPlus, lineNumbers: true }]],
rehypePlugins: [
rehypeSlug,
// [