Created
April 4, 2013 16:02
-
-
Save mpicker0/5311693 to your computer and use it in GitHub Desktop.
I'm converting my site from GetSimple CMS to Jekyll. This converts a GetSimple CMS XML data file to an .html file for Jekyll, containing the proper YAML front matter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text"/> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="/"> | |
<xsl:text>---</xsl:text> | |
<xsl:text> </xsl:text> | |
<xsl:text>title: </xsl:text> | |
<xsl:value-of select="/item/title" /> | |
<xsl:text> </xsl:text> | |
<xsl:text>parent: </xsl:text> | |
<xsl:value-of select="/item/parent" /> | |
<xsl:text> </xsl:text> | |
<xsl:text>slug: </xsl:text> | |
<xsl:value-of select="/item/url" /> | |
<xsl:text> </xsl:text> | |
<xsl:text>layout: default</xsl:text> | |
<xsl:text> </xsl:text> | |
<xsl:text>---</xsl:text> | |
<xsl:text> </xsl:text> | |
<xsl:value-of select="/item/content" /> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Convert all files in a directory using this script.