summary refs log tree commit diff
path: root/_layouts
diff options
context:
space:
mode:
authormayx2025-06-25 11:29:21 +0000
committermayx2025-06-25 11:29:21 +0000
commite4e0261e0a44140f2e1462ab08f8e87b3cd92853 (patch)
treee2e0e4206dd5d120eebe770920575dc229bb11a6 /_layouts
parentfb76deac38a021da38622abc54e08d63ce05cf84 (diff)
Update 3 files
- /_layouts/xslt_container.html
- /_layouts/xslt.html
- /feed.xslt.xml
Diffstat (limited to '_layouts')
-rw-r--r--_layouts/xslt.html18
-rw-r--r--_layouts/xslt_container.html1
2 files changed, 16 insertions, 3 deletions
diff --git a/_layouts/xslt.html b/_layouts/xslt.html
index 2bbadd6..e45726c 100644
--- a/_layouts/xslt.html
+++ b/_layouts/xslt.html
@@ -2,6 +2,18 @@
 layout: default
 ---
 
-{{ content }}
-<xsl:apply-templates select="atom:feed/atom:entry" />
-<xsl:apply-templates select="/rss/channel/item" />
\ No newline at end of file
+<xsl:choose>
+    <xsl:when test="xsl:stylesheet">
+        这是订阅预览的样式文件,你可以通过以下链接订阅该博客:<br />
+        <ul>
+            <li><a href="{{ site.feed.path | relative_url }}">Atom</a></li>
+            <li><a href="/rss.xml">RSS</a></li>
+            <li><a href="/feed.json">JSON Feed</a></li>
+        </ul>
+    </xsl:when>
+    <xsl:otherwise>
+        {{ content }}
+        <xsl:apply-templates select="atom:feed/atom:entry" />
+        <xsl:apply-templates select="/rss/channel/item" />
+    </xsl:otherwise>
+</xsl:choose>
\ No newline at end of file
diff --git a/_layouts/xslt_container.html b/_layouts/xslt_container.html
index c3bce97..44b6f87 100644
--- a/_layouts/xslt_container.html
+++ b/_layouts/xslt_container.html
@@ -1,4 +1,5 @@
 {% if page.layout == "xslt" %}<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xml" href="/feed.xslt.xml"?>
 <xsl:stylesheet
     version="3.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"