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

how to generate sitemap.xml when rendering site #409

Open
urbanophile opened this issue Oct 6, 2021 · 1 comment
Open

how to generate sitemap.xml when rendering site #409

urbanophile opened this issue Oct 6, 2021 · 1 comment

Comments

@urbanophile
Copy link

I am using rmarkdown::render_site() to build my distill website. If I call this function with no additional arguments then no sitemap.xml is generated. It's not totally clear to me that why if I instead call render_site(encoding = 'UTF-8') then sitemap.xml is generated. Rendering the sitemap seems to part of the distill code, but it's not totally clear in the documentation how rmarkdown interfaces with distill, hence I have not sure how I was suppose figure this out. Given that sitemaps are pretty handy things to have , this seems kinda like either a bug or an omission in the documentation.

@cderv
Copy link
Collaborator

cderv commented Oct 6, 2021

Hi,

thanks for the report.

Sitemap in distill should be written if you have a base_url setup. Otherwise, it won't.
Then:

  • Sitemap should be written when you render a post for a blog.
  • When render_site() is run. I am not sure why setting encoding would change the behavior.

I think your report could be related to #381 and it seems there is something wrong in the interaction between knitting a single post and rendering a site

However, I can't reproduce:

  • I am using Distill blog template - works also with website template project
  • I am adding base_url field in config _site.yml
  • I render the website using rmarkdown::render_site()
  • A sitemap.xml gets correctly created in the _site folder

distill version used is current dev version 1.2.7

Can you share steps to reproduce your issue ?

Thank you.

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