Adds the blog's posts, categories, bloggers, teams and the tags that ask to be indexed to a
site's /sitemap.xml, through the
seo:sitemap:urls mishka_installer hook MishkaCmsCore.Runtime.Compilers.SitemapCompiler fires
when it builds a site's sitemap. A post, a category, a tag, a blogger or a team written rebuilds its
site's sitemap, because those resources list
MishkaCmsCore.Runtime.Resources.Notifiers.SitemapRefresh.
Core lists the blog's pages whose only capture is the language. /:lang/blog/:slug also holds a
slug only this extension can fill, so core hands such a page over in the payload's pages, and
this fills it. A page is listed exactly when its own head lets a search engine index it, so every
row a visitor can open at an indexable address is listed, with or without posts:
- a published post, at the post page, with
lastmoditsupdated_atandimagesitsfeatured_image_url, or none when it has no such image; - an active category, at its page, with
lastmoditsupdated_at; - a blogger who is not archived, and an active team, at its page in each language the page
answers, with
lastmoditsupdated_at; - a tag only when its own
seo_tagshold a robots meta that saysindex: a public tag's page saysnoindex(MishkaBlog.Plugins.PageSeo) unless its own robots meta replaces that.
Each row at its own language and slug, at the address the site's URL mode gives it
(MishkaCmsCore.Runtime.Languages.url/3). A kind is listed only while pages holds its page —
the page whose extra says it shows that kind ("blog:post", "blog:category", "blog:tag",
"blog:author", "blog:team"), which every page MishkaBlog.Provision writes says — so a page
switched off, closed to visitors or marked noindex lists nothing — and a row only in a
language that page answers (PageEditions.served_languages/2), so no address here 404s. A row
that opens with a permission, or whose own seo_tags hold a robots meta saying noindex or
none, is left out as such a page is (PageEditions.listed?/2): a post or a category in a locked
category is too, as its page asks for that category's
(MishkaBlog.Resources.Calculations.EffectivePermissions).
A kind whose page names permissions lists nothing: the build reads as a guest, and a guest is
shown no post, category, tag, blogger or team whose page is closed to them
(MishkaBlog.Resources.Preparations.OpenToActor).
The addresses follow the payload's urls as a stream, and nothing is read while the hook runs:
the build reads the rows as it reads the stream, through :public_list as the blog's pages read
them, on the payload's site, as a guest — a build has nobody signed in behind it, and a crawler is
a guest — a hundred at a time after the last one read
(MishkaCmsCore.Runtime.Compilers.SitemapCompiler.stream_rows/2). Each row is listed once, since
a slug is unique on its site. Registered in MishkaBlog.Application.
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for MishkaInstaller.Event.Hook.enable/0.
Callback implementation for MishkaInstaller.Event.Hook.get/0.
Optional. See MishkaInstaller.Event.Hook.health_check/0. Override to report health.
Optional. See MishkaInstaller.Event.Hook.on_dependency_error/1. Override to react.
Callback implementation for MishkaInstaller.Event.Hook.register/0.
Callback implementation for MishkaInstaller.Event.Hook.restart/0.
Callback implementation for MishkaInstaller.Event.Hook.start/0.
Callback implementation for MishkaInstaller.Event.Hook.stop/0.
Callback implementation for MishkaInstaller.Event.Hook.unregister/0.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec config() :: keyword()
@spec enable() :: okey_return() | error_return()
Callback implementation for MishkaInstaller.Event.Hook.enable/0.
@spec get() :: keyword()
Callback implementation for MishkaInstaller.Event.Hook.get/0.
Optional. See MishkaInstaller.Event.Hook.health_check/0. Override to report health.
Optional. See MishkaInstaller.Event.Hook.on_dependency_error/1. Override to react.
@spec register() :: okey_return() | error_return()
Callback implementation for MishkaInstaller.Event.Hook.register/0.
@spec restart() :: okey_return() | error_return()
Callback implementation for MishkaInstaller.Event.Hook.restart/0.
@spec start() :: okey_return() | error_return()
Callback implementation for MishkaInstaller.Event.Hook.start/0.
@spec stop() :: okey_return() | error_return()
Callback implementation for MishkaInstaller.Event.Hook.stop/0.
@spec unregister() :: okey_return() | error_return()
Callback implementation for MishkaInstaller.Event.Hook.unregister/0.