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

Option to set sitemap filename #1047

Closed
mortenpi opened this issue Aug 15, 2023 · 1 comment · Fixed by #1049
Closed

Option to set sitemap filename #1047

mortenpi opened this issue Aug 15, 2023 · 1 comment · Fixed by #1049

Comments

@mortenpi
Copy link

We need to rename the sitemap.xml file for a Franklin site. We can just rename the file after the build, but it would be convenient if Franklin could do it for us. Would it be reasonable to have an option for this, e.g. sitemap_filename, that would default to sitemap.xml, but could be customized?

I'd be happy to look into a PR for this, but I could use some pointers to understand the codebase. I see it's currently hard-coded in these two places:

Sitemap: $(joinpath(globvar(:website_url)::String, "sitemap.xml"))

dst = joinpath(path(:site), "sitemap.xml")

Would it be as easy as just adding a globvar(:sitemap_file) call to those places?

@tlienart
Copy link
Owner

Would it be as easy as just adding a globvar(:sitemap_file) call to those places?

yes! and adding a sitemap_file here with default:

"generate_sitemap" => dpair(true),

tlienart added a commit that referenced this issue Aug 18, 2023
* closes #1047 adding sitemap_file global variable

* small patch

* adding sitemap_filename alias
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

Successfully merging a pull request may close this issue.

2 participants