Skip to content

sitemap generation does not include base url #3863

@biscuit314

Description

@biscuit314

Describe the bug

Setting both base: and sitemap: in the site config does not work as expected. The hostname value in the sitemap config is used, but all paths exclude the base: path. Adding the additional path to hostname does not fix the issue.

Reproduction

Configure a site with the following:

export default defineConfig({
    base: '/path/',
    sitemap: {
        hostname: 'https://example.org'
    }
})

Expected behavior

The sitemap generated from the above should all begin with https://example.org/path/... but instead the /path/ part is missing.

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory: 4.55 GB / 15.72 GB
  Binaries:
    Node: 20.2.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.6.6 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.1

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions