sitemap styling

This commit is contained in:
2026-03-18 11:11:11 -07:00
parent aa9951e68d
commit b5aff7207e
282 changed files with 3178 additions and 3080 deletions

View File

@ -3,6 +3,7 @@ permalink: sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="sitemap.xsl" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{% for page in collections.all %}
{% if page.data.permalink != false %}

36
src/meta/sitemap.xsl.njk Normal file
View File

@ -0,0 +1,36 @@
---
permalink: sitemap.xsl
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9">
<xsl:template match="/">
<html>
<head>
<title>Sitemap</title>
</head>
<body>
<table>
<thead>
<tr>
<th>URL</th>
<th>Last modified</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="sitemap:urlset/sitemap:url">
<tr>
<td>
<xsl:value-of select="sitemap:loc" />
</td>
<td>
<xsl:value-of select="sitemap:lastmod" />
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>