mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2025-07-19 17:32:03 +00:00
Update 4 files
- /_layouts/xslt_container.html - /_layouts/xslt.html - /sitemap.xsl - /feed.xslt.xml
This commit is contained in:
parent
0afcae7cd8
commit
4de724f972
@ -4,7 +4,7 @@ layout: default
|
|||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="xsl:stylesheet">
|
<xsl:when test="xsl:stylesheet">
|
||||||
这是本站XML文件(例如订阅源或者Sitemap)的样式文件,你可以通过以下链接订阅该博客:<br />
|
这是本站XML文件(例如订阅源或者<a href="/sitemap.xml">Sitemap</a>)的样式文件,你可以通过以下链接订阅该博客:<br />
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ site.feed.path | relative_url }}">Atom</a></li>
|
<li><a href="{{ site.feed.path | relative_url }}">Atom</a></li>
|
||||||
<li><a href="/rss.xml">RSS</a></li>
|
<li><a href="/rss.xml">RSS</a></li>
|
||||||
|
@ -7,51 +7,7 @@
|
|||||||
xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9">
|
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:output method="html" version="4.0" encoding="UTF-8" indent="yes" doctype-system="about:legacy-compat" />
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="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 class="gray">
|
|
||||||
Published at <xsl:value-of select="substring(atom:published, 0, 11)" />
|
|
||||||
</small>
|
|
||||||
<p><xsl:value-of select="atom:summary"/></p>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="/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 class="gray">
|
|
||||||
Published at <xsl:value-of select="substring(pubDate, 0, 17)" />
|
|
||||||
</small>
|
|
||||||
<p><xsl:value-of select="description"/></p>
|
|
||||||
<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:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
{% else %}<!DOCTYPE html>
|
{% else %}<!DOCTYPE html>
|
||||||
|
@ -6,7 +6,39 @@ title: 订阅预览
|
|||||||
<h1>订阅预览</h1>
|
<h1>订阅预览</h1>
|
||||||
<p>这是一个订阅源(Feed)。 复制当前URL到任何支持 Atom/RSS 的阅读器,即可订阅本博客的最新文章。
|
<p>这是一个订阅源(Feed)。 复制当前URL到任何支持 Atom/RSS 的阅读器,即可订阅本博客的最新文章。
|
||||||
<br />
|
<br />
|
||||||
以下为其内容预览:</p>
|
以下展示了此订阅源包含的最新文章:</p>
|
||||||
<hr />
|
<hr />
|
||||||
<xsl:apply-templates select="atom:feed/atom:entry" />
|
<xsl:for-each select="atom:feed/atom:entry">
|
||||||
<xsl:apply-templates select="/rss/channel/item" />
|
<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>
|
11
sitemap.xsl
11
sitemap.xsl
@ -6,5 +6,14 @@ title: Sitemap
|
|||||||
<h1>Sitemap</h1>
|
<h1>Sitemap</h1>
|
||||||
<p>以下是本站的所有链接:</p>
|
<p>以下是本站的所有链接:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<xsl:apply-templates select="sm:urlset" />
|
<xsl:for-each select="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:for-each>
|
||||||
</ul>
|
</ul>
|
Loading…
x
Reference in New Issue
Block a user