2021-09-05 16:37:21 +02:00
|
|
|
import fs from "fs";
|
|
|
|
import path from "path";
|
|
|
|
|
|
|
|
// POSTS_PATH is useful when you want to get the path to a specific file
|
2021-09-06 16:42:22 +02:00
|
|
|
export const GARDENS_PATH = path.join(process.cwd(), "gardens");
|
|
|
|
export const TOOLS_PATH = path.join(process.cwd(), "tools");
|
2021-09-05 16:37:21 +02:00
|
|
|
|
|
|
|
// patternFilePath is the list of all mdx files inside the POSTS_PATH directory
|
2021-09-05 17:09:03 +02:00
|
|
|
export const gardenFilePath = fs
|
2021-09-05 16:37:21 +02:00
|
|
|
.readdirSync(GARDENS_PATH)
|
|
|
|
// Only include md(x) files
|
2021-09-05 17:09:03 +02:00
|
|
|
.filter((path) => /\.mdx?$/.test(path));
|