Skip to content

Commit

Permalink
Filter out mdx from l1 l2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmering committed Jul 16, 2024
1 parent 8b66620 commit efe6079
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/components/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const buildL1StaticPaths = () => {
if (fs.existsSync(path.join(pageRoot, fileName))) return !fs.lstatSync(path.join(pageRoot, fileName)).isDirectory();
return false;
})
.filter((fileName) => fileName.endsWith('.md'))
.map((fileName) => {
const path = fileName.replace('.md', '');
if (knownPaths.indexOf(path) < 0) {
Expand Down Expand Up @@ -199,6 +200,7 @@ export const buildL2StaticPaths = () => {
if (fs.lstatSync(calculatePath).isDirectory()) {
const subFiles = fs.readdirSync(calculatePath);
return subFiles
.filter((subFile) => subFile.endsWith('.md'))
.flatMap((subFile) => {
const childPath = fileName.replace('.md', '');
if (knownPaths.indexOf(childPath) < 0) {
Expand Down

0 comments on commit efe6079

Please sign in to comment.