You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
robotop.krasnikov.pro/utils/mdxUtilsComp.ts

11 lines
423 B

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 POSTS_PATH_COMP = path.join(process.cwd(), 'competition');
// postFilePaths is the list of all mdx files inside the POSTS_PATH directory
export const postFilePathsComp = fs
.readdirSync(POSTS_PATH_COMP)
// Only include md(x) files
.filter((path) => /\.mdx?$/.test(path));