On a sub-path deployment the sitemap lists the site root twice — once with a
trailing slash and once without — so it carries one more entry than the site
has pages.
Everything else about base is correct on 0.13.1: I re-ran the checks from
#105 after #112/#114 and all 481 root-relative URLs across a 14-page build
carry the base, favicon and shiki.css included. This is the last piece of that
family I can still see.
Reproduction
create-nimbus-docs scaffold, nimbus-docs 0.13.1, with a sub-path added:
// astro.config.ts
export default defineConfig({
site: "https://example.github.io",
base: "/my-project",
// …
});
astro build, then look at dist/sitemap-0.xml:
https://example.github.io/my-project ← no trailing slash
https://example.github.io/my-project/
https://example.github.io/my-project/getting-started/
…
Only one root page exists (dist/index.html), and the build reports 15 pages
for 14 routes plus 404.html, which sitemaps exclude — so 14 entries are
expected and 15 are emitted. The extra one is the bare base.
It needs base
Same scaffold with base removed emits the root exactly once:
https://example.com/
https://example.com/getting-started/
…
Not a site misconfiguration
The integration bridges nimbusConfig.site into Astro's top-level site, so I
tried it both ways on a project site — site as the bare origin
(https://example.github.io) and as the origin plus sub-path
(https://example.github.io/my-project). Both emit 15 entries, and the
canonical tag is correct in both (https://example.github.io/my-project/), so
the duplicate does not appear to come from how site and base are split.
Impact
Minor: the canonical tags point at the trailing-slash form, so crawlers should
consolidate the two. But the sitemap is the thing that asks them to crawl both,
and a sitemap that disagrees with its own canonicals is an odd signal to send.
It also makes entry counts a slightly unreliable check when validating a build.
Happy to test a patch — I have a sub-path site set up and the before/after
checks scripted.
On a sub-path deployment the sitemap lists the site root twice — once with a
trailing slash and once without — so it carries one more entry than the site
has pages.
Everything else about
baseis correct on 0.13.1: I re-ran the checks from#105 after #112/#114 and all 481 root-relative URLs across a 14-page build
carry the base, favicon and shiki.css included. This is the last piece of that
family I can still see.
Reproduction
create-nimbus-docsscaffold, nimbus-docs 0.13.1, with a sub-path added:astro build, then look atdist/sitemap-0.xml:Only one root page exists (
dist/index.html), and the build reports 15 pagesfor 14 routes plus
404.html, which sitemaps exclude — so 14 entries areexpected and 15 are emitted. The extra one is the bare base.
It needs
baseSame scaffold with
baseremoved emits the root exactly once:Not a
sitemisconfigurationThe integration bridges
nimbusConfig.siteinto Astro's top-levelsite, so Itried it both ways on a project site —
siteas the bare origin(
https://example.github.io) and as the origin plus sub-path(
https://example.github.io/my-project). Both emit 15 entries, and thecanonical tag is correct in both (
https://example.github.io/my-project/), sothe duplicate does not appear to come from how
siteandbaseare split.Impact
Minor: the canonical tags point at the trailing-slash form, so crawlers should
consolidate the two. But the sitemap is the thing that asks them to crawl both,
and a sitemap that disagrees with its own canonicals is an odd signal to send.
It also makes entry counts a slightly unreliable check when validating a build.
Happy to test a patch — I have a sub-path site set up and the before/after
checks scripted.