mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-19 08:51:23 +08:00
feat: disable to use the path as the category
This commit is contained in:
@ -7,6 +7,7 @@ const contentDir = path.join(__dirname, '../src/content/post')
|
||||
// full path, root path, parent path
|
||||
|
||||
const getCategoryMode = 'parent'
|
||||
const isGetCategoryFromPath = false
|
||||
|
||||
function toCamelCase(str) {
|
||||
return str
|
||||
@ -56,6 +57,11 @@ function getCategoryFromPath(filePath) {
|
||||
|
||||
function processFile(filePath) {
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8')
|
||||
|
||||
if (!isGetCategoryFromPath) {
|
||||
return
|
||||
}
|
||||
|
||||
const category = getCategoryFromPath(filePath)
|
||||
|
||||
if (!category) {
|
||||
|
Reference in New Issue
Block a user