sitemap styling
This commit is contained in:
@ -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
36
src/meta/sitemap.xsl.njk
Normal 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>
|
||||
Reference in New Issue
Block a user