diff --git a/site/site.hamlet b/site/site.hamlet new file mode 100644 index 000000000..b4cced47c --- /dev/null +++ b/site/site.hamlet @@ -0,0 +1,40 @@ +!!! + + #{title} + <link rel="stylesheet" type="text/css" href="/css/style.css" /> + <style + <link rel="stylesheet" type="text/css" href="/js/highslide/highslide.css" /> + <script type="text/javascript" src="/js/highslide/highslide.js"></script> + <script type="text/javascript"> + hs.graphicsDir = '/js/highslide/graphics/'; + hs.outlineType = 'rounded-black'; + hs.captionEval = 'this.thumb.title'; + + <body + <div style="text-align:center;" + <!-- <a href="/"><img src="/logo.jpg" border="0" ALT="" /></a> --> + <div#navigation + <a href="/README.html">Home</a> + <a href="/DOWNLOAD.html">Download</a> + <a href="/MANUAL.html">Docs</a> + <a href="/DEVELOPMENT.html">Development</a> + <a href="/NEWS.html">News</a> + <a href="/SCREENSHOTS.html">Screenshots</a> + <a href="http://demo.hledger.org">Demo</a> + + #{body} + + <div#footer + <hr /> + © 2007-2011 <a href="http://joyful.com/">Simon Michael</a> and contributors + + <script type="text/javascript"> + var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.'); + document.write(unescape('%3Cscript src=\'' + gaJsHost + 'google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E')); + <script type="text/javascript"> + try { + var pageTracker = _gat._getTracker('UA-3456280-3'); + pageTracker._trackPageview(); + } catch(err) {} diff --git a/site/site.hs b/site/site.hs index 6eb8df5d9..7b687e91b 100644 --- a/site/site.hs +++ b/site/site.hs @@ -22,12 +22,12 @@ main = do symlinkIndexHtml symlinkProfsDir hakyll $ do - match "templates/*" $ compile templateCompiler - match "css/*" css - match "images/*" file - match "js/**" file + match "*.hamlet" hamlet + match "*.md" page + match "css/*" css + match "images/*" file + match "js/**" file match "robots.txt" file - match "*.md" page symlinkPagesFromParentDir = do fs <- filter (".md" `isSuffixOf`) `fmap` getDirectoryContents ".." @@ -35,11 +35,12 @@ symlinkPagesFromParentDir = do symlinkIndexHtml = ensureSiteDir >> system "ln -sf README.html _site/index.html" symlinkProfsDir = ensureSiteDir >> system "ln -sf ../../profs _site/profs" ensureSiteDir = system "mkdir -p _site" +hamlet = compile templateCompiler file = route idRoute >> compile copyFileCompiler css = route idRoute >> compile compressCssCompiler page = do route $ setExtension "html" - compile $ pageCompilerWith pandocParserState pandocWriterOptions >>> applyTemplateCompiler "templates/default.html" >>> relativizeUrlsCompiler + compile $ pageCompilerWith pandocParserState pandocWriterOptions >>> applyTemplateCompiler "site.hamlet" >>> relativizeUrlsCompiler pandocParserState = defaultParserState {- -- stateParseRaw = False, -- ^ Parse raw HTML and LaTeX? diff --git a/site/templates/default.html b/site/templates/default.html deleted file mode 100644 index 97e6e5266..000000000 --- a/site/templates/default.html +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>hledger.org - $title$ - - - - - - -
- -
- - $body$ - - - - - - - -