Skip to content

Commit 3b3a4e9

Browse files
authored
fix: sitemap url (#1142)
1 parent c5a3fe8 commit 3b3a4e9

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@doc-kit/generator-react': patch
3+
'@node-core/doc-kit': patch
4+
---
5+
6+
fix(sitemap): emit fully resolved page URLs

‎packages/node/src/config/index.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@ export default {
8282

8383
sitemap: {
8484
indexURL: '{baseURL}/latest/api/',
85+
pageURL: '{baseURL}/latest/api{path}.html',
8586
},
8687
};

‎packages/react/src/sitemap/README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The `sitemap` generator creates a `sitemap.xml` file for search engine optimizat
66

77
- `output` {string} The directory where `sitemap.xml` will be written.
88
- `indexURL` {string} URL template for the API documentation index page.
9-
**Default:** `'{baseURL}/latest/api/'`.
10-
- `pageURL` {string} URL template for individual documentation pages.
11-
**Default:** `'{indexURL}{path}.html'`.
9+
**Default:** `'{baseURL}/'`.
10+
- `pageURL` {string} URL template for individual documentation pages. `{path}`
11+
is the page's extensionless path and starts with a slash
12+
**Default:** `'{baseURL}{path}.html'`.

‎packages/react/src/sitemap/index.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616

1717
defaultConfiguration: {
1818
indexURL: '{baseURL}/',
19-
pageURL: '{indexURL}{path}.html',
19+
pageURL: '{baseURL}{path}.html',
2020
},
2121

2222
generate,

0 commit comments

Comments
 (0)