From 34e64b34280fe44be6d1971beaee5c1eaec0e14f Mon Sep 17 00:00:00 2001 From: gbanyan Date: Mon, 17 Nov 2025 15:46:48 +0800 Subject: [PATCH] Add content submodule and point Contentlayer to it --- .gitmodules | 3 +++ content | 1 + contentlayer.config.ts | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 content diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..cf98ff8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "content"] + path = content + url = https://gitea.gbanyan.net/gbanyan/personal-blog.git diff --git a/content b/content new file mode 160000 index 0000000..8f61bdf --- /dev/null +++ b/content @@ -0,0 +1 @@ +Subproject commit 8f61bdf0caf67e3fa7bafc201c4a94e214de4f6d diff --git a/contentlayer.config.ts b/contentlayer.config.ts index 3ad6a27..187ab90 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -74,8 +74,8 @@ export const Page = defineDocumentType(() => ({ })); export default makeSource({ - // Use the existing blog repo as content source - contentDirPath: '../Blog 文章原稿', + // Use git submodule `content` (personal-blog) as content source + contentDirPath: 'content', documentTypes: [Post, Page], contentDirExclude: ['Arc 瀏覽器使用心得.md'], fieldOptions: {