Drive archive posts from content
This commit is contained in:
parent
d74495ddef
commit
b4025aecaf
4 changed files with 276 additions and 2 deletions
|
|
@ -1,10 +1,13 @@
|
|||
import fs from "node:fs/promises";
|
||||
import { contentSourceRoutes } from "../lib/content-routes";
|
||||
import { isMigratedHtmlPage, relativeWebsitePath, routeFromRelativePath, sourcePathFromRoute, walkHtmlFiles } from "../lib/static-pages";
|
||||
|
||||
export function getStaticPaths() {
|
||||
export async function getStaticPaths() {
|
||||
const markdownRoutes = await contentSourceRoutes();
|
||||
|
||||
return walkHtmlFiles()
|
||||
.map(relativeWebsitePath)
|
||||
.filter((relativePath) => !isMigratedHtmlPage(relativePath))
|
||||
.filter((relativePath) => !isMigratedHtmlPage(relativePath) && !markdownRoutes.has(relativePath))
|
||||
.map((relativePath) => ({
|
||||
params: {
|
||||
route: routeFromRelativePath(relativePath),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue