jbaubree / sitemap-ts

MIT License
58 stars 5 forks source link

Ability to add base path #62

Closed flauwekeul closed 1 year ago

flauwekeul commented 1 year ago

Hi! I'm using your library to generate a sitemap for a VitePress site (https://abbekeultjes.nl/honeycomb). I'd like to be able to generate links in the sitemap for a hostname and base path (not sure if that's the best name): https://abbekeultjes.nl/honeycomb/. When I pass that url for the hostname option, the /honeycomb/ part is removed. This makes sense, since it's not part of the hostname.

Could you add an option to specify any path elements that get appended to the hostname?

Thanks!

jbaubree commented 1 year ago

Hi, Thanks for your report, i will check this out as soon as posible.

jbaubree commented 1 year ago

You can try v1.2.0 with basePath option. This will normally fix your issue. If you get any trouble with this, feel free to come back to me.

flauwekeul commented 1 year ago

Thanks! Works like a charm 👌