Files
blog-nextjs/.contentlayer/.cache/v0.3.4/compiled-contentlayer-config-KXFCTWNG.mjs.map
2025-11-17 15:28:20 +08:00

8 lines
3.4 KiB
Plaintext

{
"version": 3,
"sources": ["../../../contentlayer.config.ts"],
"sourcesContent": ["import { defineDocumentType, makeSource } from 'contentlayer/source-files';\nimport rehypeSlug from 'rehype-slug';\nimport rehypeAutolinkHeadings from 'rehype-autolink-headings';\nimport remarkGfm from 'remark-gfm';\n\nexport const Post = defineDocumentType(() => ({\n name: 'Post',\n filePathPattern: `posts/**/*.md`,\n contentType: 'mdx',\n fields: {\n title: { type: 'string', required: true },\n slug: { type: 'string', required: false },\n tags: { type: 'list', of: { type: 'string' }, required: false },\n published_at: { type: 'date', required: false },\n description: { type: 'string', required: false }\n },\n computedFields: {\n url: {\n type: 'string',\n resolve: (doc) =>\n `/blog/${doc.slug || doc._raw.flattenedPath.replace('posts/', '')}`\n },\n flattenedPath: {\n type: 'string',\n resolve: (doc) => doc._raw.flattenedPath.replace('posts/', '')\n }\n }\n}));\n\nexport const Page = defineDocumentType(() => ({\n name: 'Page',\n filePathPattern: `pages/**/*.md`,\n contentType: 'mdx',\n fields: {\n title: { type: 'string', required: true },\n slug: { type: 'string', required: false },\n description: { type: 'string', required: false }\n },\n computedFields: {\n url: {\n type: 'string',\n resolve: (doc) =>\n `/pages/${doc.slug || doc._raw.flattenedPath.replace('pages/', '')}`\n },\n flattenedPath: {\n type: 'string',\n resolve: (doc) => doc._raw.flattenedPath.replace('pages/', '')\n }\n }\n}));\n\nexport default makeSource({\n // Use the existing blog repo as content source\n contentDirPath: '../Blog \u6587\u7AE0\u539F\u7A3F',\n documentTypes: [Post, Page],\n // Ignore frontmatter `type: post|page` and rely on filePathPattern\n documentTypeNameField: 'docType',\n mdx: {\n remarkPlugins: [remarkGfm],\n rehypePlugins: [\n rehypeSlug,\n [rehypeAutolinkHeadings, { behavior: 'wrap' }]\n ]\n }\n});\n"],
"mappings": ";AAAA,SAAS,oBAAoB,kBA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