summaryrefslogtreecommitdiff
path: root/feed.xslt.xml
diff options
context:
space:
mode:
authormayx <mayx@outlook.com>2025-06-29 10:31:33 +0200
committermayx <mayx@outlook.com>2025-06-29 10:31:33 +0200
commit4de724f972c65ca474994e321b66844ded99f544 (patch)
tree9e4acdee89ae79152f9055e4529929b98c8ba3c8 /feed.xslt.xml
parent0afcae7cd8ee9efab216a1d3abfa613516f0e466 (diff)
Update 4 files
- /_layouts/xslt_container.html - /_layouts/xslt.html - /sitemap.xsl - /feed.xslt.xml
Diffstat (limited to 'feed.xslt.xml')
-rw-r--r--feed.xslt.xml38
1 files changed, 35 insertions, 3 deletions
diff --git a/feed.xslt.xml b/feed.xslt.xml
index d3c6a13..c2452de 100644
--- a/feed.xslt.xml
+++ b/feed.xslt.xml
@@ -6,7 +6,39 @@ title: 订阅预览
<h1>订阅预览</h1>
<p>这是一个订阅源(Feed)。 复制当前URL到任何支持 Atom/RSS 的阅读器,即可订阅本博客的最新文章。
<br />
-以下为其内容预览:</p>
+以下展示了此订阅源包含的最新文章:</p>
<hr />
-<xsl:apply-templates select="atom:feed/atom:entry" />
-<xsl:apply-templates select="/rss/channel/item" /> \ No newline at end of file
+<xsl:for-each select="atom:feed/atom:entry">
+ <div class="item">
+ <h2>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="atom:link/@href"/>
+ </xsl:attribute>
+ <xsl:value-of select="atom:title"/>
+ </a>
+ </h2>
+ <small>
+ Published at <xsl:value-of select="substring(atom:published, 0, 11)" />
+ </small>
+ <p><xsl:value-of select="atom:summary"/></p>
+ <hr />
+ </div>
+</xsl:for-each>
+<xsl:for-each select="/rss/channel/item">
+ <div class="item">
+ <h2>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="link"/>
+ </xsl:attribute>
+ <xsl:value-of select="title"/>
+ </a>
+ </h2>
+ <small>
+ Published at <xsl:value-of select="substring(pubDate, 0, 17)" />
+ </small>
+ <p><xsl:value-of select="description"/></p>
+ <hr />
+ </div>
+</xsl:for-each> \ No newline at end of file