Permalink
Browse files

Added Html5 format, for html5 extension.

Made demo site use html5 extension.
  • Loading branch information...
1 parent 9aba952 commit 31b1858906a6fc09b2dfe241cf3a0787e474dfb0 @jgm committed Oct 24, 2012
Showing with 6 additions and 2 deletions.
  1. +3 −0 Yst/Render.hs
  2. +1 −0 Yst/Types.hs
  3. +1 −1 demo/config.yaml
  4. 0 demo/{layout.html.st → layout.html5.st}
  5. +1 −1 yst.cabal
View
@@ -88,6 +88,7 @@ renderNavNode targeturl (NavMenu tit nodes) =
formatFromExtension :: FilePath -> Format
formatFromExtension f = case (map toLower $ takeExtension f) of
".html" -> HtmlFormat
+ ".html5" -> Html5Format
".xhtml" -> HtmlFormat
".latex" -> LaTeXFormat
".tex" -> LaTeXFormat
@@ -141,6 +142,8 @@ converterForFormat f =
let reader = readMarkdown defaultParserState{stateSmart = True}
in case f of
HtmlFormat -> writeHtmlString defaultWriterOptions{
+ writerHtml5 = False } . reader
+ Html5Format -> writeHtmlString defaultWriterOptions{
writerHtml5 = True } . reader
LaTeXFormat -> writeLaTeX defaultWriterOptions . reader
PlainFormat -> id
View
@@ -106,6 +106,7 @@ data FilterTest = TestEq
data SortDirection = Ascending | Descending deriving (Show, Read, Eq)
data Format = HtmlFormat
+ | Html5Format
| LaTeXFormat
| ConTeXtFormat
| PlainFormat
View
@@ -3,4 +3,4 @@ title: My Website
sourcedir: [., templates]
datadir: .
filesdir: [files, yahoo]
-layout: layout.html.st
+layout: layout.html5.st
File renamed without changes.
View
@@ -32,7 +32,7 @@ data-files: README.markdown
demo/events.yaml
demo/index.st
demo/index.yaml
- demo/layout.html.st
+ demo/layout.html5.st
demo/layout.tex.st
demo/room101.txt
demo/room203.txt

0 comments on commit 31b1858

Please sign in to comment.