Closed orontee closed 1 year ago
After reading https://docs.getpelican.com/en/latest/faq.html#how-can-i-override-the-generated-url-of-a-specific-page-or-article I tried to add an empty Url
metadata in the page at the origin of the problem and the sitemap now looks good.
I may have misunderstood the documentation, not clear to me. Feel free to close this issue if the behavior I described is expected.
if the behavior I described is expected.
I don't know from this plugin side, but from pelican
side: yes it's expected. URL
for a file is very much dependent on the how the site is served so pelican
stays away from trying to guesstimate any value. So if you specify SAVE_AS
, you are expected to define a compatible URL
as well (and vice versa).
@orontee: I hope the answer @avaris provided was helpful and that you are finding the Sitemap plugin to be useful. 😊
When a page as a
save_as
keyword with valueindex.html
, it's entry in the sitemap may refer to the wrong location.Example
See first entry of the sitemap generated with tag v1 of https://github.com/orontee/lesmotsdugene refers to the URL
https://lesmotsdugene.fr/pages/eugene-vicat-dit-le-gene.html
but Pelican doesn't generate this resource. Note also thatindex.html
is missing from the sitemap.Source code of the
index.html
page: https://github.com/orontee/lesmotsdugene/blob/v1/content/pages/eugene-vicat-dit-le-gene.md withsave_as
keyword on line 7.(Edit: I've updated the
exclude
config of the plugin to fix the wrong URL butindex.html
is still missing...)Details
Python 3.11.2 under Debian Bookworm in virtual environment with following packages installed: