zine/public/rss.xsl
Anthony Wang 2534413a9f
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/manual/woodpecker Pipeline was successful
ci/woodpecker/deployment/woodpecker Pipeline was successful
Use XSL to style RSS feed (thanks @iacore!)
2024-02-24 22:54:12 -05:00

35 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>
RSS Feed | <xsl:value-of select="//title"/>
</title>
<!-- where is the stylesheet? -->
<!-- <link rel="stylesheet" href="/assets/styles.css"/> -->
</head>
<body>
<p>
This is an RSS feed. Visit
<a href="https://aboutfeeds.com">About Feeds</a>
to learn more and get started.
</p>
<h1>RSS Feed | <xsl:value-of select="//title"/></h1>
<xsl:for-each select="//item">
<article>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</article>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>