mirror of
https://github.com/MaggieAppleton/digital-gardeners.git
synced 2026-02-21 05:07:19 +01:00
switched to mdx
This commit is contained in:
parent
1d7be78e38
commit
67b393a1f0
12 changed files with 16 additions and 9 deletions
12
utils/mdxUtils.js
Normal file
12
utils/mdxUtils.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
// POSTS_PATH is useful when you want to get the path to a specific file
|
||||
export const GARDENS_PATH = path.join(process.cwd(), "posts", "gardens");
|
||||
export const TOOLS_PATH = path.join(process.cwd(), "posts", "tools");
|
||||
|
||||
// patternFilePath is the list of all mdx files inside the POSTS_PATH directory
|
||||
export const gardenFilePath = fs
|
||||
.readdirSync(GARDENS_PATH)
|
||||
// Only include md(x) files
|
||||
.filter((path) => /\.mdx?$/.test(path));
|
||||
Loading…
Add table
Add a link
Reference in a new issue