tobimori / kirby-seo

🔎 All-in-one toolkit that makes implementing SEO & Meta best practices in your Kirby 4+ site a breeze

Home Page:https://plugins.andkindness.com/seo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sitemap functionality

tobimori opened this issue · comments

Taken over from the roadmap so I can have a few notes with things I noticed in a recent project:

  • (optional) seperate sitemaps for multi-language

  • (optional) seperate sitemaps for page templates

  • following options:

    • loc
    • lastmod (modified)
    • changefreq (config (per type) or blueprint?, have to decide)
    • priority (function in config, by default -0.2 for each new depth)

cache sitemap with manual staticache integration if enabled

no image or video functionality for the first release

@tobimori This already sounds very promising. I got a few question/remarks:

  • (optional) seperate sitemaps for multi-language

What is the reason for providing multiple sitemaps for different languages? AFAIK the common way of displaying multiple languages is to import the xhtml namespace and using <xhtml:link /> tags within the sitemap for linking alternative language versions (see e.g. https://fabianmichael.de/sitemap.xml`).

For very very large sites, the filesize could become a limit, though I don’t think that this would ever become an issue for most of us …

Sitemap size limits: All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs. If you have a larger file or more URLs, you must break your sitemap into multiple sitemaps. You can optionally create a sitemap index file and submit that single index file to Google. You can submit multiple sitemaps and sitemap index files to Google. This may be useful if you want to track the search performance of each individual sitemap in Search Console.

Source: https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap

  • (optional) seperate sitemaps for page templates

Can you explain this a bit further?

cache sitemap with manual staticache integration if enabled

This one is easy by using a custom page model (see https://github.com/fabianmichael/kirby-meta/blob/main/config/routes.php#L39)

no image or video functionality for the first release

As far as I remember, my plugin introduced some hooks which allow manipulation of the sitemap’s DOM tree for adding the required notes when one of my plugins required that. Would be very cool, if this could be handles on page-level as well (e.g. the page model provides an array of files to include within the sitemap). I would also not recommend to enable this by default, since you don’t want to expose your entire file pool by default.

I understand that there is no real technical limitation for splitting sitemaps, but I like to have them human-accessible as well and splitting (by language, or page template type, etc.) is something I found very helpful in the past for that.