aboutsummaryrefslogtreecommitdiff
path: root/source/02_data
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-07-20 20:02:55 +0200
committerAdrian Kummerlaender2014-07-20 20:02:55 +0200
commit6265f7f4be3a54a8a27330918c59ef16da458124 (patch)
treeb22f1828905fc8822eb95e74e5b883123690441c /source/02_data
parente15b3bc2c4036363c5d9b9fd7e62d224920b5514 (diff)
downloadblog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.tar
blog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.tar.gz
blog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.tar.bz2
blog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.tar.lz
blog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.tar.xz
blog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.tar.zst
blog.kummerlaender.eu-6265f7f4be3a54a8a27330918c59ef16da458124.zip
Split page datasource entry into title and content
* 'h1' node is used as title and any other node as content * modified result page transformation accordingly
Diffstat (limited to 'source/02_data')
-rw-r--r--source/02_data/pages.xsl11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/02_data/pages.xsl b/source/02_data/pages.xsl
index 85ea8ca..f2360c1 100644
--- a/source/02_data/pages.xsl
+++ b/source/02_data/pages.xsl
@@ -23,11 +23,20 @@
</xsl:variable>
<xsl:template match="files/pages/file[./extension = '.md']">
- <entry handle="{./name}">
+ <xsl:variable name="content">
<xsl:call-template name="formatter">
<xsl:with-param name="format">/usr/bin/markdown</xsl:with-param>
<xsl:with-param name="source" select="InputXSLT:read-file(./full)/text()"/>
</xsl:call-template>
+ </xsl:variable>
+
+ <entry handle="{./name}">
+ <title>
+ <xsl:value-of select="xalan:nodeset($content)/h1"/>
+ </title>
+ <content>
+ <xsl:copy-of select="xalan:nodeset($content)/*[name() != 'h1']"/>
+ </content>
</entry>
</xsl:template>