Skip to content
This repository was archived by the owner on Oct 7, 2026. It is now read-only.

Commit c06ceed

Browse files
authored
docs: redirect old API overview to entity reference (#178)
1 parent 949c23d commit c06ceed

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎docs/.vitepress/config.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ export default defineConfig({
112112
const newBase = pageData.relativePath.startsWith("api/")
113113
? "https://btravstack.github.io/btravstack/"
114114
: "https://btravstack.github.io/btravstack/entity/";
115-
const canonicalUrl = `${newBase}${normalizedPath}`
116-
.replace(/index\.md$/, "")
117-
.replace(/\.md$/, "");
115+
const canonicalUrl =
116+
pageData.relativePath === "api/index.md"
117+
? "https://btravstack.github.io/btravstack/api/entity/"
118+
: `${newBase}${normalizedPath}`.replace(/index\.md$/, "").replace(/\.md$/, "");
118119

119120
pageData.frontmatter ??= {};
120121
pageData.frontmatter.head ??= [];

0 commit comments

Comments
 (0)