Rename post folder name

This commit is contained in:
DefectingCat
2022-12-16 08:53:21 +08:00
parent d899e211a5
commit e5466c43da
32 changed files with 18 additions and 18 deletions

View File

@ -2,7 +2,7 @@
import fs from 'fs/promises';
import path from 'path';
const dataPath = 'data/posts';
const dataPath = 'content/posts';
/**
* Build post information for Algolia search.
@ -16,7 +16,7 @@ const postLists = async () => {
const getFiles = async (f) => {
const content = await fs.readFile(path.join(dataPath, f), 'utf-8');
// const { data: meta, content } = matter(markdownWithMeta);
// const { content: meta, content } = matter(markdownWithMeta);
const slug = f.replace(/\.mdx$/, '');
const regex = /^#{2,3}(?!#)(.*)/gm;