Jekyll Sitemap not adding base url

hello.
I’m using beautiful jekyll from Dean Attali to build my personal site. so i add my site to google searcch console. and i try to submit my sitemap https://jekyllandhyde.netlify.app/sitemap.xml and it got error. probably because it didnt have base url.
how can i automaticly add my base url to sitemap ?

Yes it must be an absolute URL with the domain.

Can you share the theme link?

You can also try use this popular plugin instead

heres the link
GitHub - daattali/beautiful-jekyll: ✨ Build a beautiful and simple website in literally minutes. Demo at https://beautifuljekyll.com.
it had auto generated sitemap using that plugin. in local its works fine but in netlify it lost base url for sitemap

Put your URL in:

url:  https://jekyllandhyde.netlify.app
baseurl: ''

based on:

Simulate Prod locally so it uses url and not localhost.

JEKYLL_ENV=production bundle exec jekyll build --trace

Then verify your sitemap in _site.


Lastly push to Netlify.

Make sure your Netlify config’s build command or the build command on Netlify is set to this too:

[build]
  command = "bundle exec jekyll build --trace"
  publish = "_site"

[build.environment]
  JEKYLL_ENV = "production"

Based on

I see the theme uses sitemap plugin internally