Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin is rendering wrong urls in sitemap if urlPrefix is set #1

Closed
koboldt opened this issue Mar 2, 2020 · 1 comment
Closed

Plugin is rendering wrong urls in sitemap if urlPrefix is set #1

koboldt opened this issue Mar 2, 2020 · 1 comment

Comments

@koboldt
Copy link

koboldt commented Mar 2, 2020

Hi,

i am new to scully.io and tried your plugin. But if i define my sitemapOptions and use an urlPrefix

const sitemapOptions = {
  urlPrefix: 'http://localhost'
}

then the url in the sitemap.xml is rendered like this:

<url>
    <loc>http:\localhost\foo\bar</loc>
    <changefreq>monthly</changefreq>
    <lastmod>2020-03-02T21:30:17.232Z</lastmod>
    <priority>0.5</priority>
</url>

I think it might be better to use url-join instead of path.join in order to concatenate the url/loc.

Kind regards

@msacket
Copy link
Contributor

msacket commented Mar 3, 2020

Thanks @koboldt, good point. I'll get that fixed asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants