Initial commit

This commit is contained in:
2025-11-17 15:28:20 +08:00
commit 0c64279e34
100 changed files with 23827 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
// contentlayer.config.ts
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import remarkGfm from "remark-gfm";
var Post = defineDocumentType(() => ({
name: "Post",
filePathPattern: `posts/**/*.md`,
contentType: "markdown",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
tags: { type: "list", of: { type: "string" }, required: false },
published_at: { type: "date", required: false },
description: { type: "string", required: false },
// extras from Ghost frontmatter
type: { type: "string", required: false },
ghost_id: { type: "string", required: false },
status: { type: "string", required: false },
visibility: { type: "string", required: false },
featured: { type: "boolean", required: false },
created_at: { type: "date", required: false },
updated_at: { type: "date", required: false },
custom_excerpt: { type: "string", required: false },
authors: { type: "list", of: { type: "string" }, required: false },
feature_image: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/blog/${doc.slug || doc._raw.flattenedPath.replace("posts/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("posts/", "")
}
}
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: `pages/**/*.md`,
contentType: "markdown",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
description: { type: "string", required: false },
// extras from Ghost frontmatter
type: { type: "string", required: false },
ghost_id: { type: "string", required: false },
status: { type: "string", required: false },
visibility: { type: "string", required: false },
featured: { type: "boolean", required: false },
created_at: { type: "date", required: false },
updated_at: { type: "date", required: false },
published_at: { type: "date", required: false },
custom_excerpt: { type: "string", required: false },
tags: { type: "list", of: { type: "string" }, required: false },
authors: { type: "list", of: { type: "string" }, required: false },
feature_image: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/pages/${doc.slug || doc._raw.flattenedPath.replace("pages/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("pages/", "")
}
}
}));
var contentlayer_config_default = makeSource({
// Use the existing blog repo as content source
contentDirPath: "../Blog \u6587\u7AE0\u539F\u7A3F",
documentTypes: [Post, Page],
contentDirExclude: ["Arc \u700F\u89BD\u5668\u4F7F\u7528\u5FC3\u5F97.md"],
fieldOptions: {
// Avoid using frontmatter `type` at all; we use filePathPattern
typeFieldName: "__ignoredType"
},
markdown: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }]
]
},
// we've configured TS paths; also silence noisy warning
disableImportAliasWarning: true
});
export {
Page,
Post,
contentlayer_config_default as default
};
//# sourceMappingURL=compiled-contentlayer-config-BANOE2CG.mjs.map

View File

@@ -0,0 +1,7 @@
{
"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: 'markdown',\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 // extras from Ghost frontmatter\n type: { type: 'string', required: false },\n ghost_id: { type: 'string', required: false },\n status: { type: 'string', required: false },\n visibility: { type: 'string', required: false },\n featured: { type: 'boolean', required: false },\n created_at: { type: 'date', required: false },\n updated_at: { type: 'date', required: false },\n custom_excerpt: { type: 'string', required: false },\n authors: { type: 'list', of: { type: 'string' }, required: false },\n feature_image: { 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: 'markdown',\n fields: {\n title: { type: 'string', required: true },\n slug: { type: 'string', required: false },\n description: { type: 'string', required: false },\n // extras from Ghost frontmatter\n type: { type: 'string', required: false },\n ghost_id: { type: 'string', required: false },\n status: { type: 'string', required: false },\n visibility: { type: 'string', required: false },\n featured: { type: 'boolean', required: false },\n created_at: { type: 'date', required: false },\n updated_at: { type: 'date', required: false },\n published_at: { type: 'date', required: false },\n custom_excerpt: { type: 'string', required: false },\n tags: { type: 'list', of: { type: 'string' }, required: false },\n authors: { type: 'list', of: { type: 'string' }, required: false },\n feature_image: { 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 contentDirExclude: ['Arc \u700F\u89BD\u5668\u4F7F\u7528\u5FC3\u5F97.md'],\n fieldOptions: {\n // Avoid using frontmatter `type` at all; we use filePathPattern\n typeFieldName: '__ignoredType'\n },\n markdown: {\n remarkPlugins: [remarkGfm],\n rehypePlugins: [\n rehypeSlug,\n [rehypeAutolinkHeadings, { behavior: 'wrap' }]\n ]\n },\n // we've configured TS paths; also silence noisy warning\n disableImportAliasWarning: true\n});\n"],
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAC/C,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AACnC,OAAO,eAAe;AAEf,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,U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e;AAAA,EACjB;AAAA,EACA,UAAU;AAAA,IACR,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe;AAAA,MACb;AAAA,MACA,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC;AAAA,IAC/C;AAAA,EACF;AAAA;AAAA,EAEA,2BAA2B;AAC7B,CAAC;",
"names": []
}

View File

@@ -0,0 +1,70 @@
// contentlayer.config.ts
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import remarkGfm from "remark-gfm";
var Post = defineDocumentType(() => ({
name: "Post",
filePathPattern: `posts/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
tags: { type: "list", of: { type: "string" }, required: false },
published_at: { type: "date", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/blog/${doc.slug || doc._raw.flattenedPath.replace("posts/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("posts/", "")
}
}
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: `pages/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/pages/${doc.slug || doc._raw.flattenedPath.replace("pages/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("pages/", "")
}
}
}));
var contentlayer_config_default = makeSource({
// Use the existing blog repo as content source
contentDirPath: "../Blog \u6587\u7AE0\u539F\u7A3F",
documentTypes: [Post, Page],
contentDirExclude: ["Arc \u700F\u89BD\u5668\u4F7F\u7528\u5FC3\u5F97.md"],
fieldOptions: {
// Ignore frontmatter `type: post|page` and rely on filePathPattern
typeFieldName: "docType"
},
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }]
]
}
});
export {
Page,
Post,
contentlayer_config_default as default
};
//# sourceMappingURL=compiled-contentlayer-config-F7YMG4JI.mjs.map

View File

@@ -0,0 +1,7 @@
{
"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 contentDirExclude: ['Arc \u700F\u89BD\u5668\u4F7F\u7528\u5FC3\u5F97.md'],\n fieldOptions: {\n // Ignore frontmatter `type: post|page` and rely on filePathPattern\n typeFieldName: 'docType'\n },\n mdx: {\n remarkPlugins: [remarkGfm],\n rehypePlugins: [\n rehypeSlug,\n [rehypeAut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AAA,IACtE;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE;AAAA,IAC/D;AAAA,EACF;AACF,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA;AAAA,EAExB,gBAAgB;AAAA,EAChB,eAAe,CAAC,MAAM,IAAI;AAAA,EAC1B,mBAAmB,CAAC,mDAAgB;AAAA,EACpC,cAAc;AAAA;AAAA,IAEZ,eAAe;AAAA,EACjB;AAAA,EACA,KAAK;AAAA,IACH,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe;AAAA,MACb;AAAA,MACA,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC;AAAA,IAC/C;AAAA,EACF;AACF,CAAC;",
"names": []
}

View File

@@ -0,0 +1,67 @@
// contentlayer.config.ts
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import remarkGfm from "remark-gfm";
var Post = defineDocumentType(() => ({
name: "Post",
filePathPattern: `posts/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
tags: { type: "list", of: { type: "string" }, required: false },
published_at: { type: "date", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/blog/${doc.slug || doc._raw.flattenedPath.replace("posts/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("posts/", "")
}
}
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: `pages/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/pages/${doc.slug || doc._raw.flattenedPath.replace("pages/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("pages/", "")
}
}
}));
var contentlayer_config_default = makeSource({
// Use the existing blog repo as content source
contentDirPath: "../Blog \u6587\u7AE0\u539F\u7A3F",
documentTypes: [Post, Page],
// Ignore frontmatter `type: post|page` and rely on filePathPattern
documentTypeNameField: "docType",
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }]
]
}
});
export {
Page,
Post,
contentlayer_config_default as default
};
//# sourceMappingURL=compiled-contentlayer-config-KXFCTWNG.mjs.map

View File

@@ -0,0 +1,7 @@
{
"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,kBAAkB;AAC/C,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AACnC,OAAO,eAAe;AAEf,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,MAAM,EAAE,MAAM,QAAQ,IAAI,EAAE,MAAM,SAAS,GAAG,UAAU,MAAM;AAAA,IAC9D,cAAc,EAAE,MAAM,QAAQ,UAAU,MAAM;AAAA,IAC9C,aAAa,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,EACjD;AAAA,EACA,gBAAgB;AAAA,IACd,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS,CAAC,QACR,SAAS,IAAI,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE,CAAC;AAAA,IACrE;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE;AAAA,IAC/D;AAAA,EACF;AACF,EAAE;AAEK,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,aAAa,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,EACjD;AAAA,EACA,gBAAgB;AAAA,IACd,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS,CAAC,QACR,UAAU,IAAI,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE,CAAC;AAAA,IACtE;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE;AAAA,IAC/D;AAAA,EACF;AACF,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA;AAAA,EAExB,gBAAgB;AAAA,EAChB,eAAe,CAAC,MAAM,IAAI;AAAA;AAAA,EAE1B,uBAAuB;AAAA,EACvB,KAAK;AAAA,IACH,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe;AAAA,MACb;AAAA,MACA,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC;AAAA,IAC/C;AAAA,EACF;AACF,CAAC;",
"names": []
}

View File

@@ -0,0 +1,65 @@
// contentlayer.config.ts
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import remarkGfm from "remark-gfm";
var Post = defineDocumentType(() => ({
name: "Post",
filePathPattern: `posts/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
tags: { type: "list", of: { type: "string" }, required: false },
published_at: { type: "date", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/blog/${doc.slug || doc._raw.flattenedPath.replace("posts/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("posts/", "")
}
}
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: `pages/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/pages/${doc.slug || doc._raw.flattenedPath.replace("pages/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("pages/", "")
}
}
}));
var contentlayer_config_default = makeSource({
// Use the existing blog repo as content source
contentDirPath: "../Blog \u6587\u7AE0\u539F\u7A3F",
documentTypes: [Post, Page],
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }]
]
}
});
export {
Page,
Post,
contentlayer_config_default as default
};
//# sourceMappingURL=compiled-contentlayer-config-MDBGDTCC.mjs.map

View File

@@ -0,0 +1,7 @@
{
"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\u7A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H,MAAM;AAAA,MACN,SAAS,CAAC,QACR,UAAU,IAAI,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE,CAAC;AAAA,IACtE;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE;AAAA,IAC/D;AAAA,EACF;AACF,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA;AAAA,EAExB,gBAAgB;AAAA,EAChB,eAAe,CAAC,MAAM,IAAI;AAAA,EAC1B,KAAK;AAAA,IACH,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe;AAAA,MACb;AAAA,MACA,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC;AAAA,IAC/C;AAAA,EACF;AACF,CAAC;",
"names": []
}

View File

@@ -0,0 +1,75 @@
// contentlayer.config.ts
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import remarkGfm from "remark-gfm";
var Post = defineDocumentType(() => ({
name: "Post",
filePathPattern: `posts/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
tags: { type: "list", of: { type: "string" }, required: false },
published_at: { type: "date", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/blog/${doc.slug || doc._raw.flattenedPath.replace("posts/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("posts/", "")
}
}
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: `pages/**/*.md`,
contentType: "mdx",
fields: {
title: { type: "string", required: true },
slug: { type: "string", required: false },
description: { type: "string", required: false }
},
computedFields: {
url: {
type: "string",
resolve: (doc) => `/pages/${doc.slug || doc._raw.flattenedPath.replace("pages/", "")}`
},
flattenedPath: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.replace("pages/", "")
}
}
}));
var contentlayer_config_default = makeSource({
// Use the existing blog repo as content source
contentDirPath: "../Blog \u6587\u7AE0\u539F\u7A3F",
documentTypes: [Post, Page],
contentDirExclude: ["Arc \u700F\u89BD\u5668\u4F7F\u7528\u5FC3\u5F97.md"],
fieldOptions: {
// Ignore frontmatter `type: post|page` and rely on filePathPattern
typeFieldName: "docType"
},
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }]
],
esbuildOptions: (options) => {
options.external = options.external ?? [];
options.external.push("react/jsx-dev-runtime");
return options;
}
}
});
export {
Page,
Post,
contentlayer_config_default as default
};
//# sourceMappingURL=compiled-contentlayer-config-REOLTCOL.mjs.map

View File

@@ -0,0 +1,7 @@
{
"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 contentDirExclude: ['Arc \u700F\u89BD\u5668\u4F7F\u7528\u5FC3\u5F97.md'],\n fieldOptions: {\n // Ignore frontmatter `type: post|page` and rely on filePathPattern\n typeFieldName: 'docType'\n },\n mdx: {\n remarkPlugins: [remarkGfm],\n rehypePlugins: [\n rehypeSlug,\n [rehypeAutolinkHeadings, { behavior: 'wrap' }]\n ],\n esbuildOptions: (options) => {\n options.external = options.external ?? [];\n options.external.push('react/jsx-dev-runtime');\n return options;\n }\n }\n});\n"],
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAC/C,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AACnC,OAAO,eAAe;AAEf,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,MAAM,EAAE,MAAM,QAAQ,IAAI,EAAE,MAAM,SAAS,GAAG,UAAU,MAAM;AAAA,IAC9D,cAAc,EAAE,MAAM,QAAQ,UAAU,MAAM;AAAA,IAC9C,aAAa,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,EACjD;AAAA,EACA,gBAAgB;AAAA,IACd,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS,CAAC,QACR,SAAS,IAAI,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE,CAAC;AAAA,IACrE;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE;AAAA,IAC/D;AAAA,EACF;AACF,EAAE;AAEK,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,aAAa,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,EACjD;AAAA,EACA,gBAAgB;AAAA,IACd,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS,CAAC,QACR,UAAU,IAAI,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE,CAAC;AAAA,IACtE;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,QAAQ,UAAU,EAAE;AAAA,IAC/D;AAAA,EACF;AACF,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA;AAAA,EAExB,gBAAgB;AAAA,EAChB,eAAe,CAAC,MAAM,IAAI;AAAA,EAC1B,mBAAmB,CAAC,mDAAgB;AAAA,EACpC,cAAc;AAAA;AAAA,IAEZ,eAAe;AAAA,EACjB;AAAA,EACA,KAAK;AAAA,IACH,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe;AAAA,MACb;AAAA,MACA,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC;AAAA,IAC/C;AAAA,IACA,gBAAgB,CAAC,YAAY;AAC3B,cAAQ,WAAW,QAAQ,YAAY,CAAC;AACxC,cAAQ,SAAS,KAAK,uBAAuB;AAC7C,aAAO;AAAA,IACT;AAAA,EACF;AACF,CAAC;",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
{
"cacheItemsMap": {}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
{
"cacheItemsMap": {}
}