diff options
author | mayx | 2025-06-26 03:21:48 +0000 |
---|---|---|
committer | mayx | 2025-06-26 03:21:48 +0000 |
commit | 0afcae7cd8ee9efab216a1d3abfa613516f0e466 (patch) | |
tree | 73b590eb65ae11e5042fde2e10e41369cb7a148e /_layouts | |
parent | dddeb23c4161a7118a7cf1163de9c110c98bebf9 (diff) |
Update 4 files
- /_layouts/xslt.html - /_layouts/xslt_container.html - /sitemap.xsl - /feed.xslt.xml
Diffstat (limited to '_layouts')
-rw-r--r-- | _layouts/xslt.html | 4 | ||||
-rw-r--r-- | _layouts/xslt_container.html | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/_layouts/xslt.html b/_layouts/xslt.html index e45726c..b02dfc5 100644 --- a/_layouts/xslt.html +++ b/_layouts/xslt.html @@ -4,7 +4,7 @@ layout: default <xsl:choose> <xsl:when test="xsl:stylesheet"> - 这是订阅预览的样式文件,你可以通过以下链接订阅该博客:<br /> + 这是本站XML文件(例如订阅源或者Sitemap)的样式文件,你可以通过以下链接订阅该博客:<br /> <ul> <li><a href="{{ site.feed.path | relative_url }}">Atom</a></li> <li><a href="/rss.xml">RSS</a></li> @@ -13,7 +13,5 @@ layout: default </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 44b6f87..bea0baf 100644 --- a/_layouts/xslt_container.html +++ b/_layouts/xslt_container.html @@ -3,7 +3,8 @@ <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:atom="http://www.w3.org/2005/Atom"> + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"> <xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes" doctype-system="about:legacy-compat" /> <xsl:template match="/"> {{ content }} @@ -42,6 +43,16 @@ <hr /> </div> </xsl:template> + <xsl:template match="sm:urlset"> + <xsl:for-each select="sm:url"> + <li> + <a> + <xsl:attribute name="href"><xsl:value-of select="sm:loc" /></xsl:attribute> + <xsl:value-of select="sm:loc" /> + </a> + </li> + </xsl:for-each> + </xsl:template> </xsl:stylesheet> {% else %}<!DOCTYPE html> {{ content }} |