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

- Link to language-specific main page
- Add section/tag information to the Atom feed template
- Update XSL transformation to conditionally display section/tag
This commit is contained in:
welpo 2024-09-20 01:52:10 +02:00
parent 52979f7f54
commit ce5a23bf1f
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6
2 changed files with 20 additions and 4 deletions

View file

@ -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>