feat(feed): make "Visit website" link context-aware (#394)

main
Óscar 5 months ago committed by GitHub
parent 52979f7f54
commit adfe28eaf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -43,9 +43,14 @@
</p>
<a class="readmore">
<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:value-of select="/atom:feed/tabi:metadata/tabi:visit_the_site" />&#160;<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>
<p></p>
</section>

@ -7,7 +7,7 @@
{%- endif -%}
<?xml version="1.0" encoding="utf-8"?>
<?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:separator>
{{ config.extra.separator | default(value="•") }}
@ -30,6 +30,15 @@
<tabi:post_listing_date>
{{- config.extra.post_listing_date | default(value="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>
{#- Load extra CSS (skin) if set in config.toml -#}
@ -47,7 +56,9 @@
{%- endif %}
<link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
<link href="
{%- if section -%}
{%- if term -%}
{{ term.permalink | escape_xml | safe }}
{%- elif section -%}
{{ section.permalink | escape_xml | safe }}
{%- else -%}
{{ get_url(path="/", lang=lang) | escape_xml | safe }}

Loading…
Cancel
Save