You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sessioncommunities.online/sites/sitemap.xml.php

62 lines
1.6 KiB
PHP

<?xml version="1.0" encoding="UTF-8"?>
<?php
require_once '+getenv.php';
function loc_lastmod(string $rel_loc, ?string $changes_under_root = null) {
global $SITE_CANONICAL_URL, $DOCUMENT_ROOT, $TEMPLATES_ROOT;
$root = $changes_under_root ?? $TEMPLATES_ROOT;
$ext = ($root == $TEMPLATES_ROOT) ? "php" : "html";
?>
<loc><?=$SITE_CANONICAL_URL . $rel_loc?></loc>
<lastmod><?=date('c', filemtime("$root$rel_loc/index.$ext"))?></lastmod>
<?php
}
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<?=loc_lastmod("/", changes_under_root: $DOCUMENT_ROOT)?>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<?=loc_lastmod("/groups/regional/", changes_under_root: $DOCUMENT_ROOT)?>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<?=loc_lastmod("/groups/tech/", changes_under_root: $DOCUMENT_ROOT)?>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<?=loc_lastmod("/groups/all/", changes_under_root: $DOCUMENT_ROOT)?>
<changefreq>weekly</changefreq>
<priority>0.2</priority>
</url>
<url>
<?=loc_lastmod("/about/")?>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<?=loc_lastmod("/privacy/")?>
<changefreq>monthly</changefreq>
<priority>0.3</priority>
</url>
<url>
<?=loc_lastmod("/support/")?>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<?=loc_lastmod("/instructions/")?>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://lp.sessioncommunities.online/</loc>
<changefreq>yearly</changefreq>
<priority>0.0</priority>
</url>
</urlset>