rss + sitemap

This commit is contained in:
Jacky Zhao
2023-07-01 13:35:27 -07:00
parent ba9f243728
commit 4c904d88ab
11 changed files with 131 additions and 491 deletions

View File

@ -27,6 +27,9 @@ export function slugify(s: string): string {
// resolve /a/b/c to ../../
export function resolveToRoot(slug: string): string {
let fp = trimPathSuffix(slug)
if (fp.endsWith("index")) {
fp = fp.slice(0, -"index".length)
}
if (fp === "") {
return "."