Closed corentinmusard closed 1 year ago
Hello,
Yes it could be interesting.
But I'd avoid dependancies with other Pelican plugin (what if there is several sitemap plugin? what if a sitemap plugin update his return format?). Maybe a good approach would be to check if a file named sitemap.*
exists in the output_path
, then add it in the robots.txt
.
Doesn't this seem like functionality that rather belongs within the Sitemap plugin itself?
I opened this issue here because the seo-plugin seems to not modify robots.txt
when I provide one myself. So I can't add the sitemap line by hand.
It could be the responsibility to the Sitemap plugin too. But if I understand well the signals, I would say that my plugin always run after the Sitemap (robots.txt
file is created when all_generators_finalized
signal is called, while Sitemap uses get_generators
signal). And it's my plugin that create the robots.txt
file (however it should verify if there is one before).
Based on this, it could be two ways to handle this:
robots.txt
file exists and create it if needed, and add the sitemap link in it. Then SEO plugin runs, and add its stuff on the file created before.robots.txt
file exists and create it if needed plus what I suggested on my previous comment.Well, you're right I think it's the responsability of the sitemap plugin. Do you want me to open an issue there?
I don't know if there is a maintainer other than the Pelican team for the sitemap plugin, but you can open an issue there anyway. You can link this issue to let anyone take note of the first ideas.
@corentinmusard: I transferred this issue to the Sitemap repository. Is this something you would like to work on implementing? As @MaevaBrunelles said, there are no dedicated maintainers for most plugins, and thus progress depends on folks stepping up to implement the features they care about. What say you?
Yes I can implement it, that's not a problem.
@corentinmusard: I'm checking in regarding this issue you submitted a while ago. Are you still interested in adding this feature to the Sitemap plugin?
Hi, I don't really have the need nor the time for that anymore to be honnest.
Upon further reflection, perhaps this topic is indeed better suited for the SEO plugin. In any case, let's put this on ice until someone wants to implement it.
It would be nice to add a line in
robots.txt
if the sitemap plugin is configured.Something like: