forked from quentin/quentin.dufour.io
Add transformation
This commit is contained in:
parent
9d3c593f64
commit
a6022e8672
2 changed files with 38 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?xml-stylesheet href="/feed.xsl" type="text/xsl"?>
|
||||||
|
|
||||||
<!-- https://support.google.com/podcast-publishers/answer/9889544?hl=fr -->
|
<!-- https://support.google.com/podcast-publishers/answer/9889544?hl=fr -->
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
|
|
37
podcast/feed.xsl
Normal file
37
podcast/feed.xsl
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- https://natclark.com/tutorials/xslt-style-rss-feed/ -->
|
||||||
|
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
|
||||||
|
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
||||||
|
<xsl:template match="/">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title><xsl:value-of select="/rss/channel/title"/></title>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/mvp.css@1.12/mvp.css" />
|
||||||
|
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1><xsl:value-of select="/rss/channel/title"/></h1>
|
||||||
|
<p><em><xsl:value-of select="/rss/channel/description"/></em></p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<xsl:for-each select="/rss/channel/item">
|
||||||
|
<article>
|
||||||
|
<h3><xsl:value-of select="title"/></h3>
|
||||||
|
<p><xsl:value-of select="description"/></p>
|
||||||
|
<audio controls="1" >
|
||||||
|
<xsl:attribute name="src">
|
||||||
|
<xsl:value-of select="enclosure/@url"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</audio>
|
||||||
|
</article>
|
||||||
|
</xsl:for-each>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
Loading…
Reference in a new issue