pelican-plugins / sitemap

Generates a site map for Pelican-powered sites
50 stars 11 forks source link

Add sitemap link if available #6

Closed corentinmusard closed 1 year ago

corentinmusard commented 3 years ago

It would be nice to add a line in robots.txt if the sitemap plugin is configured.

Something like:

Sitemap: https://www.blog.com/sitemap.xml
MaevaBrunelles commented 3 years 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.

justinmayer commented 3 years ago

Doesn't this seem like functionality that rather belongs within the Sitemap plugin itself?

corentinmusard commented 3 years ago

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.

MaevaBrunelles commented 3 years ago

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.txtfile 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:

corentinmusard commented 3 years ago

Well, you're right I think it's the responsability of the sitemap plugin. Do you want me to open an issue there?

MaevaBrunelles commented 3 years ago

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.

justinmayer commented 3 years ago

@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?

corentinmusard commented 3 years ago

Yes I can implement it, that's not a problem.

justinmayer commented 1 year ago

@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?

corentinmusard commented 1 year ago

Hi, I don't really have the need nor the time for that anymore to be honnest.

justinmayer commented 1 year ago

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.