mirror of
https://github.com/MaggieAppleton/digital-gardeners.git
synced 2025-11-15 12:50:23 +01:00
initial setup
This commit is contained in:
parent
6a2bde16e5
commit
6792dabecb
27 changed files with 4436 additions and 0 deletions
12
utils/mdUtils.js
Normal file
12
utils/mdUtils.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 gardensFilePath = fs
|
||||
.readdirSync(GARDENS_PATH)
|
||||
// Only include md(x) files
|
||||
.filter((path) => /\.md?$/.test(path));
|
||||
Loading…
Add table
Add a link
Reference in a new issue