{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:47Z","object_id":{"id":1273,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_rsc_pivot_done","title":"observe_rsc_pivot_done\/2","uri":"https:\/\/zotonic.com\/id\/1273"},"seq":1}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"subject":{"objects":[{"created":"2026-09-09T13:47:47Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:47Z","object_id":{"id":2566,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_operator","title":"Operator","uri":"https:\/\/zotonic.com\/id\/2566"},"seq":2},{"created":"2026-09-09T13:47:47Z","object_id":{"id":2587,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_search_engine_optimization","title":"Search engine optimization","uri":"https:\/\/zotonic.com\/id\/2587"},"seq":3},{"created":"2026-09-09T13:47:47Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":4},{"created":"2026-09-09T13:47:47Z","object_id":{"id":2644,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_index","title":"Index","uri":"https:\/\/zotonic.com\/id\/2644"},"seq":5},{"created":"2026-09-09T13:47:47Z","object_id":{"id":2648,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_serialize","title":"Serialize","uri":"https:\/\/zotonic.com\/id\/2648"},"seq":6},{"created":"2026-09-09T13:47:47Z","object_id":{"id":2665,"is_a":["categorization","keyword","keyword_data_type"],"name":"zotonic_topic_structured_data","title":"Structured data","uri":"https:\/\/zotonic.com\/id\/2665"},"seq":7}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1292,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1292"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_seo_sitemap","page_url":{"en":"https:\/\/zotonic.com\/docs\/1292\/mod_seo_sitemap","x-default":"https:\/\/zotonic.com\/docs\/1292\/mod_seo_sitemap"},"preview_url":null,"resource":{"version":4022,"pivot_location_lat":null,"title":"mod_seo_sitemap","is_authoritative":true,"body":"<p>Creates a <code>sitemap.xml<\/code> file for your site, containing links to all publicly accessible pages.<\/p>\n<p>mod_seo_sitemap creates a <code>sitemap.xml<\/code> file for which is used by the Google bot to index your site. By default, its\ngenerated sitemap.xml lists all pages of the categories text, event, location, collection and person in the system which\nare publicly viewable.<\/p>\n<p>The sitemaps follow the specification at <a href=\"https:\/\/www.sitemaps.org\/protocol.html\">https:\/\/www.sitemaps.org\/protocol.html<\/a><\/p>\n<h2>Maintaining the sitemap index<\/h2>\n<p>The <code>seo_sitemap<\/code> model maintains an index of all pages (and their URLs) that are publicly readable.<\/p>\n<p>There is a button in the System &gt; Status menu to rebuild the sitemap index. This is needed if there are (big) changes in\nthe access control affecting the publicly viewable pages or if languages are changed.<\/p>\n<p>If a resource is edited then all URLs of that resource are automatically added to the sitemap index tables.<\/p>\n<h2>Structure of the sitemap<\/h2>\n<p>The generated sitemap is an index file with links to urlset files.<\/p>\n<p>The urlsets links are generated from a combination of two sources:<\/p>\n<ol><li>All resources and URLs in the sitemap index tables maintained by model <code>seo_sitemap<\/code><\/li><li>Urlsets for by the <code>#seo_sitemap_index{}<\/code> notification.<\/li><\/ol>\n<p>The <code>#seo_sitemap_index{}<\/code> is a map notification where all modules can return 0 or more maps with information about\ntheir pages. The map should be like:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">#{\n    source =&gt; &lt;&lt;&quot;wherefrom&quot;&gt;&gt;,          % Unique code\n    count =&gt; 1234,                      % Number of URLs\n    size =&gt; 5000,                       % (optional) number of URLs per urlset\n    lastmod =&gt; {{2021,5,12}, {0,0,0}}   % (optional) last modification date\n}\n<\/code><\/pre>\n<p>The sitemap urlset is generated using the <code>#seo_sitemap_urlset{}<\/code> notification:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">#seo_sitemap_urlset, {\n    source =&gt; &lt;&lt;&quot;wherefrom&quot;&gt;&gt;,          % Unique code from the ``#seo_sitemap_index{}``\n    offset =&gt; 1,                        % Offset for search, 1 based.\n    limit =&gt; 50000                      % Number of URLs to be returned\n}\n<\/code><\/pre>\n<p>This is a <em>first<\/em> notification and should return a list of maps. Each map contains a single URL:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">#{\n    loc =&gt; &lt;&lt;&quot;https:\/\/example.com\/...&quot;, % The URL for the urlset\n    lastmod =&gt; {{2021,5,12}, {0,0,0}}}, % (optional) last modification date\n    priority =&gt; 0.5,                    % (optional) priority, between 0.0..1.0\n    changefreq =&gt; &lt;&lt;&quot;weekly&quot;&gt;&gt;          % (optional) change frequency, for recrawls\n}\n<\/code><\/pre>\n<h2>Creating a sitemap without using mod_seo_sitemap<\/h2>\n<p>If you have a site with mostly static URLS, it might be easier to create your own sitemap XML file. If you create a\ndispatch rule like this:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{sitemap_xml, [&quot;sitemap.xml&quot;], controller_template, [{template, &quot;mysitemap.tpl&quot;}, {content_type, &quot;text\/xml&quot;}]}\n<\/code><\/pre>\n<p>You will be able to write your own sitemap.xml file (in a mysitemap.tpl template) without using mod_seo_sitemap.\nThis might be handy if you serve mostly static files.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_rsc_pivot_done<\/code>: Refresh sitemap metadata for the resource after pivoting changed its searchable fields.<\/li><li><code>observe_seo_sitemap_index<\/code>: Return the number of entries in the mod_seo_sitemap managed sitemaps using <code>m_seo_sitemap:count<\/code>.<\/li><li><code>observe_seo_sitemap_urlset<\/code>: Return the urlset belonging to the slice given using <code>m_seo_sitemap:slice<\/code>.<\/li><\/ul>\n<p>Delegate callbacks:<\/p>\n<ul><li><code>event\/2<\/code> with <code>postback<\/code> messages: <code>sitemap_rebuild<\/code>.<\/li><\/ul>","slug":"mod_seo_sitemap","doc_module_config":[],"is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"a42705cd94ce7252b181542a4179026245b9ddf1e923d65a9c97c4223e7ca661","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_seo_sitemap\/src\/mod_seo_sitemap.erl","publication_start":"2023-06-24T08:17:55Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_seo_sitemap\/src\/mod_seo_sitemap.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_seo_sitemap","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:16Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_seo_sitemap","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"c19e5c894d3bd01b57581e2af43e176d42c6877a\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-08T10:40:49Z","title_slug":"mod_seo_sitemap"},"uri":"https:\/\/zotonic.com\/id\/1292","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1292"}},"status":"ok"}