Metadecidim
Sign in

Process

Co-creating the roadmap 2025–2027

finished not yet on protocol

Add .xml sitemap config flag to /system

Is your feature request related to a problem? A clear and concise description of what the problem is.

Client get frustrated that we don't have a simple way to generate an .xml sitemap for Decidim websites. It's recommended for SEO.

Describe the solution you'd like

On a multi-tenant Decidim instance I may not want to generate a sitemap for all orgs as some maybe used for private purposes (ex: "Force users to authenticate before access organization")

As a system admin, I'd like to have a config flag in /system in the org edit form to choose to generate an .xml sitemap for the org I'm editing.

We could use an existing gem like https://www.ruby-toolbox.com/projects/sitemap_generator to generate the site map.

The sitemap generator would need to exclude :

  • /admin and /system links
  • Private spaces links

The sitemap needs to be be

  • frequently updated → a cron job can run periodically
  • and sent to search engines → We need to decide if we leave the responsibility to the admin of the org or if we try to ease up the process a little bit for them. We could use this gem https://www.ruby-toolbox.com/projects/pingr so that the pinging to search engine is automated

Describe alternatives you've considered

At this stage I'm wondering :

  • if this feature could be of interest to the rest of the community. If not we can always make a module;
  • what's the best way to generate a xml sitemap for a Decidim site;

Additional context

Add any other context or screenshots about the feature request here.

Does this issue could impact on users private data?

No

Funded by

Possible funding by Lausanne

12 comments

  1. In favour

    I would see this useful feature to have in Decidim.

    Regarding the questions, right now I believe there is no simple way to generate the sitemap automatically as Decidim does not centrally store anywhere the records that can be referred to in public URLs. Probably each component and each participatory space would have to implement the sitemap link generation specifically to that component/space + all static pages, so it would require changes in all components. You could potentially parse through all the URLs available in Decidim but you wouldn't cover individual resources (e.g. all proposal IDs) doing it like that.

    Also instances that do not allow public access can have publicly available pages which could be included in the Sitemap. Of course, most of the resources should not be added to the sitemap.xml on those sites.

    1 votes up 0 votes down
  2. Hi, please a naive implementation here:
    https://github.com/armandfardeau/sitemap_generator
    (Tests are needed, no TDD on this one, it was a late coding night)

    Demo can be found:
    https://dcd-develop.osp.dev/sitemap.xml

    2 votes up 0 votes down
    1. Obviously this is not the final version of the tool, I think it is better to use a module approach with a register system like for metrics or components. I would be happy to help on the implementation if possible.

      0 votes up 0 votes down
      1. Also, the controller is hideous, it was just a quick bypass.

        0 votes up 0 votes down
  3. I would love to hear more feedback about other developers and installations. Do anyone have issues regarding SEO/search crawlers or is that it'd be nice to have?
    An user story that starts with "Client get frustrated..." makes me wonder why it's useful... this should be "as an user I get frustrated that I can't find some pages in search engines like Google" but I didn't hear that one yet.

    From Wikipedia article [0]

    > Some areas of the website are not available through the browsable interface
    > Webmasters use rich Ajax, Silverlight, or Flash content that is not normally processed by search engines.
    > The site is very large and there is a chance for the web crawlers to overlook some of the new or recently updated content
    > When websites have a huge number of pages that are isolated or not well linked together, or
    > When a website has few external links

    I'd said that this are not our case most of the times (some installations may be "very large" tough).

    > We could use this gem https://www.ruby-toolbox.com/projects/pingr so that the pinging to search engine is automated

    I'd prefer an alternative that has more traction/community. Also I don't like that only Google and Bing are supported. Instead of sending ourselves the the sitemap to search engines (aka "push") I'd prefer to have it configured in the public/robots.txt file and that search engines "pull" from us where to find the sitemap.

    SEO wise I think it'd be much more interesting to have unique HTML titles in all the public pages at least. For instance Initiatives [1] or Consultations [2] index list have the default one; this is just a quick search, if you look for it methodically you'll find lots of this missing titles and this have SEO, usability and accessibility implications.

    [0] https://en.wikipedia.org/wiki/Sitemaps
    [1] https://meta.decidim.org/initiatives
    [2] https://meta.decidim.org/consultations

    1 votes up 0 votes down
  4. Hey @virgile_deville, do you have any feedback from @andres comment? (As you can see we are finally doing a bit of spring cleaning 😜)

    0 votes up 0 votes down
  5. I am actually working on having that as a stand alone module. Currently it only lists all the resources, without any participatory space pages.

    I i am thinking more and more to create it as a “seo” module, since we have some requests to improve the meta tags and other items.

    0 votes up 0 votes down
    1. Hey @alecslupu

      Could you share a link to your module ? What do you mean by "without any participatory space pages" ? What pages do you list ?

      I'll be working of making a meta proposal to share the SEO improvements made by the EU experts.

      Maybe we can make PR to the core if it's accepted.

      0 votes up 0 votes down
      1. Agréable

        0 votes up 0 votes down
  6. Here is the module : https://git.fpfis.eu/future-of-europe/digit-cofe-libraries/digit-cofe-sitemap

    Thanks @Armand-OSP for the great inspiration source

    0 votes up 0 votes down
    1. Hey @alecslupu

      Is this module still being maintained? The link does not work anymore. asking because we have a site for a city that is hardly indexed by search engines and I'm exploring options.

      0 votes up 0 votes down
      1. Hello @lars,

        I have not played recently with the module, and most likely still have some things to be fixed. Have a look on the following repository

        https://github.com/alecslupu-pfa/decidim-sitemaps

        It is incomplete but supports Decidim 29.1

        0 votes up 0 votes down

Sign in with your Atmosphere account to comment.