✨ feat(feed): make "Visit website" link context-aware (#394)
This commit is contained in:
parent
52979f7f54
commit
adfe28eaf9
@ -43,9 +43,14 @@
|
|||||||
</p>
|
</p>
|
||||||
<a class="readmore">
|
<a class="readmore">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="/atom:feed/@xml:base"/>
|
<xsl:value-of select="/atom:feed/atom:link[@rel='alternate']/@href"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="/atom:feed/tabi:metadata/tabi:visit_the_site" /> <span class="arrow">→</span>
|
<xsl:value-of select="/atom:feed/tabi:metadata/tabi:visit_the_site" />
|
||||||
|
<xsl:if test="/atom:feed/tabi:metadata/tabi:current_section != /atom:feed/atom:title">
|
||||||
|
<xsl:text>: </xsl:text>
|
||||||
|
<xsl:value-of select="/atom:feed/tabi:metadata/tabi:current_section" />
|
||||||
|
</xsl:if>
|
||||||
|
<span class="arrow"> →</span>
|
||||||
</a>
|
</a>
|
||||||
<p></p>
|
<p></p>
|
||||||
</section>
|
</section>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<?xml-stylesheet href="{{ get_url(path='/feed_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?>
|
<?xml-stylesheet href="{{ get_url(path='/feed_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?>
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}" xml:base="{{ config.base_url }}">
|
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
|
||||||
<tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
|
<tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
|
||||||
<tabi:separator>
|
<tabi:separator>
|
||||||
{{ config.extra.separator | default(value="•") }}
|
{{ config.extra.separator | default(value="•") }}
|
||||||
@ -30,6 +30,15 @@
|
|||||||
<tabi:post_listing_date>
|
<tabi:post_listing_date>
|
||||||
{{- config.extra.post_listing_date | default(value="date") -}}
|
{{- config.extra.post_listing_date | default(value="date") -}}
|
||||||
</tabi:post_listing_date>
|
</tabi:post_listing_date>
|
||||||
|
<tabi:current_section>
|
||||||
|
{%- if term -%}
|
||||||
|
{{ term.name }}
|
||||||
|
{%- elif section.title -%}
|
||||||
|
{{ section.title }}
|
||||||
|
{%- else -%}
|
||||||
|
{{ config.title }}
|
||||||
|
{%- endif -%}
|
||||||
|
</tabi:current_section>
|
||||||
</tabi:metadata>
|
</tabi:metadata>
|
||||||
|
|
||||||
{#- Load extra CSS (skin) if set in config.toml -#}
|
{#- Load extra CSS (skin) if set in config.toml -#}
|
||||||
@ -47,7 +56,9 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
<link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
|
<link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
|
||||||
<link href="
|
<link href="
|
||||||
{%- if section -%}
|
{%- if term -%}
|
||||||
|
{{ term.permalink | escape_xml | safe }}
|
||||||
|
{%- elif section -%}
|
||||||
{{ section.permalink | escape_xml | safe }}
|
{{ section.permalink | escape_xml | safe }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ get_url(path="/", lang=lang) | escape_xml | safe }}
|
{{ get_url(path="/", lang=lang) | escape_xml | safe }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user