xsl/gemini: add support for <link> in navigation.xml
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d4b1e972bd
commit
e201eb2f6e
|
@ -15,26 +15,45 @@
|
||||||
|
|
||||||
<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>
|
<text> </text>
|
||||||
<value-of select="concat($baseurl, ., '.gmi')"/>
|
|
||||||
<text> </text>
|
|
||||||
<choose>
|
|
||||||
<when test="string-length(@title) = 0">
|
|
||||||
<value-of select="document(concat('../content/pages/', ., '.xml'))/page/@title"/>
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<value-of select="@title"/>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
<text> </text>
|
|
||||||
</for-each>
|
|
||||||
</for-each>
|
</for-each>
|
||||||
<text> </text>
|
|
||||||
|
|
||||||
<call-template name="body"/>
|
<call-template name="body"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template mode="navitem" match="file">
|
||||||
|
<text>=> </text>
|
||||||
|
<value-of select="concat($baseurl, ., '.gmi')"/>
|
||||||
|
<text> </text>
|
||||||
|
<choose>
|
||||||
|
<when test="string-length(@title) = 0">
|
||||||
|
<value-of select="document(concat('../content/pages/', ., '.xml'))/page/@title"/>
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<value-of select="@title"/>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<text> </text>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<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 match="/page[@pagetitle]">
|
<template match="/page[@pagetitle]">
|
||||||
<text># </text><value-of select="@pagetitle"/><text> | c3d2.de </text>
|
<text># </text><value-of select="@pagetitle"/><text> | c3d2.de </text>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue