xsl/gemini: add support for <link> in navigation.xml
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d4b1e972bd
commit
e201eb2f6e
|
@ -15,7 +15,14 @@
|
||||||
|
|
||||||
<text>## Navigation </text>
|
<text>## Navigation </text>
|
||||||
<for-each select="document('../content/navigation.xml')/navigation/group">
|
<for-each select="document('../content/navigation.xml')/navigation/group">
|
||||||
<for-each select="file">
|
<apply-templates mode="navitem" select="child::*"/>
|
||||||
|
<text> </text>
|
||||||
|
</for-each>
|
||||||
|
|
||||||
|
<call-template name="body"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template mode="navitem" match="file">
|
||||||
<text>=> </text>
|
<text>=> </text>
|
||||||
<value-of select="concat($baseurl, ., '.gmi')"/>
|
<value-of select="concat($baseurl, ., '.gmi')"/>
|
||||||
<text> </text>
|
<text> </text>
|
||||||
|
@ -28,11 +35,23 @@
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
<text> </text>
|
<text> </text>
|
||||||
</for-each>
|
</template>
|
||||||
</for-each>
|
|
||||||
<text> </text>
|
|
||||||
|
|
||||||
<call-template name="body"/>
|
<template mode="navitem" match="link">
|
||||||
|
<text>=> </text>
|
||||||
|
<call-template name="make-href">
|
||||||
|
<with-param name="href">
|
||||||
|
<choose>
|
||||||
|
<when test="@href"><value-of select="@href"/></when>
|
||||||
|
<otherwise><value-of select="."/></otherwise>
|
||||||
|
</choose>
|
||||||
|
</with-param>
|
||||||
|
</call-template>
|
||||||
|
<text> </text>
|
||||||
|
<call-template name="normalize-paragraph">
|
||||||
|
<with-param name="text" select="normalize-space(.)"/>
|
||||||
|
</call-template>
|
||||||
|
<text> </text>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template match="/page[@pagetitle]">
|
<template match="/page[@pagetitle]">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user