优化文件结构
This commit is contained in:
@@ -173,7 +173,7 @@ common_col_conf: &common_col_conf
|
||||
collections:
|
||||
- name: "2023"
|
||||
label: "2023"
|
||||
folder: "source/_posts/2023"
|
||||
folder: "posts/2023"
|
||||
preview_path: "2023/{{filename}}/"
|
||||
<<: *common_col_conf
|
||||
- name: "pages"
|
||||
@@ -214,4 +214,4 @@ collections:
|
||||
|
||||
# 大功告成
|
||||
|
||||
访问博客的admin就可以了
|
||||
访问博客的admin就可以了
|
||||
@@ -1,7 +1,7 @@
|
||||
import { readdir, readFile, writeFile } from 'node:fs/promises';
|
||||
import { basename, extname, join, relative } from 'node:path';
|
||||
|
||||
const POSTS_DIR = join(process.cwd(), 'source', '_posts');
|
||||
const POSTS_DIR = join(process.cwd(), 'posts');
|
||||
|
||||
const CRC32_TABLE = new Uint32Array(256);
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ export type BlogPost = MarkdownModule & {
|
||||
href: string;
|
||||
};
|
||||
|
||||
const modules = import.meta.glob<MarkdownModule>('/source/_posts/**/*.md', { eager: true });
|
||||
const modules = import.meta.glob<MarkdownModule>('/posts/**/*.md', { eager: true });
|
||||
|
||||
function asArray(value: unknown): string[] {
|
||||
if (Array.isArray(value)) return value.map(String).filter(Boolean);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
import BaseLayout from '@/layouts/BaseLayout.astro';
|
||||
import PageHeaderCard from '@/components/PageHeaderCard.astro';
|
||||
import { Content } from '../../source/shuoshuo/index.md';
|
||||
import TwikooComments from '@/components/TwikooComments.astro';
|
||||
|
||||
const title = '说说';
|
||||
const twikooEnvId = 'https://comment.biss.click';
|
||||
---
|
||||
|
||||
<BaseLayout title={title} description="记录日常碎片和灵感的说说页面。">
|
||||
@@ -21,7 +22,9 @@ const title = '说说';
|
||||
})();
|
||||
</script>
|
||||
<div class="shuoshuo-markdown prose">
|
||||
<Content />
|
||||
<div id="talk"></div>
|
||||
</div>
|
||||
<TwikooComments envId={twikooEnvId} path="/shuoshuo/" title={title} />
|
||||
<script is:inline src="/js/shuoshuo.js"></script>
|
||||
</section>
|
||||
</BaseLayout>
|
||||
|
||||
Reference in New Issue
Block a user