Skip to content

Commit

Permalink
redirects again (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor authored Oct 14, 2024
1 parent 4660eb3 commit 9e8449b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ function writeMarkdown(aep: AEP) {

const filePath = path.join("src/content/docs", `${aep.id}.mdx`)
fs.writeFileSync(filePath, aep.contents.build(), { flag: "w" });

aep.contents.frontmatter.slug = aep.slug;

const slugPath = path.join("src/content/docs", `${aep.slug}.mdx`)
fs.writeFileSync(slugPath, aep.contents.build(), { flag: "w" });
}

function writeSidebar(sideBar: any, filePath: string) {
Expand Down Expand Up @@ -245,7 +240,7 @@ ${sections.join("\n")}
}

function buildRedirects(aeps: AEP[]): object {
return {};
return Object.fromEntries(aeps.map((aep) => [`/${aep.slug}`, `/${aep.id}`]));;
}

function buildHomepage(): Markdown {
Expand Down

0 comments on commit 9e8449b

Please sign in to comment.