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>
|
||||
<for-each select="document('../content/navigation.xml')/navigation/group">
|
||||
<for-each select="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>
|
||||
</for-each>
|
||||
<apply-templates mode="navitem" select="child::*"/>
|
||||
<text> </text>
|
||||
</for-each>
|
||||
<text> </text>
|
||||
|
||||
<call-template name="body"/>
|
||||
</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]">
|
||||
<text># </text><value-of select="@pagetitle"/><text> | c3d2.de </text>
|
||||
|
||||
|
|
Loading…
Reference in New Issue