diff --git a/web/about.markdown b/web/about.markdown index 108663b..90d6b1c 100644 --- a/web/about.markdown +++ b/web/about.markdown @@ -2,13 +2,13 @@ title: About --- -## Code +# Code The code for Hakyll is freely available on [github](http://github.com/jaspervdj/Hakyll/). Patches and suggestions are always very welcome. -## Inspiration +# Inspiration Hakyll is not the only static site generator out there. It was inspired by the following awesome projects: @@ -17,13 +17,13 @@ following awesome projects: - [nanoc](http://nanoc.stoneship.org/) - [Jekyll](http://jekyllrb.com/) -## License +# License Hakyll is available under a BSD license. Note, however, that pandoc is released under a GPL license. Since you'll probably use Hakyll with pandoc, you will have to license your code under a GPL-compatible license. -## Authors +# Authors Hakyll was originally written by [Jasper Van der Jeugt](http://jaspervdj.be), who still maintains the package. Contributors: diff --git a/web/css/default.css b/web/css/default.css index 06f664c..25509a8 100644 --- a/web/css/default.css +++ b/web/css/default.css @@ -14,19 +14,15 @@ body { div#header { height: 32px; - padding: 20px 0px 20px 60px; + margin: 20px 0px 20px 60px; + text-transform: uppercase; + font-weight: bold; + font-size: 28px; } div#header img { display: inline; - vertical-align: middle; -} - -div#header h1 { - padding-left: 10px; - display: inline; - text-transform: uppercase; - vertical-align: middle; + margin: 0px 0px 0px 0px; } div#main { @@ -65,13 +61,19 @@ a { color: black; } +h1 { + font-size: 20px; +} + h2 { - font-size: 120%; - text-transform: uppercase; + font-size: 18px; } h3 { - font-size: 100%; + font-size: 16px; +} + +h1, h2, h3 { text-transform: uppercase; } diff --git a/web/examples.markdown b/web/examples.markdown index 5e07865..f8cfbc2 100644 --- a/web/examples.markdown +++ b/web/examples.markdown @@ -2,7 +2,7 @@ title: Examples --- -## Simple examples +# Simple examples A number of simple examples are available in the GitHub repository. They can be found [here](https://github.com/jaspervdj/hakyll-examples). The README located @@ -11,7 +11,7 @@ directory using git clone git://github.com/jaspervdj/hakyll-examples.git -## People using Hakyll +# People using Hakyll A lot of sites running Hakyll also publish the source code. This is a very interesting resource to learn from as well. If you're using Hakyll for your diff --git a/web/hakyll.hs b/web/hakyll.hs index df92ddd..3ae9d03 100644 --- a/web/hakyll.hs +++ b/web/hakyll.hs @@ -2,6 +2,7 @@ import Hakyll import Control.Monad (forM_) import Control.Arrow ((>>>), arr) +import Data.Monoid (mempty) import Text.Pandoc main :: IO () @@ -23,15 +24,26 @@ main = hakyll $ do >>> applyTemplateCompiler "templates/default.html" >>> relativizeUrlsCompiler - -- Tutorial - match "tutorial.markdown" $ do + -- Tutorials + match "tutorials/*" $ do route $ setExtension "html" - compile $ readPageCompiler - >>> pageRenderPandocWith defaultHakyllParserState withToc + compile $ pageCompilerWith defaultHakyllParserState withToc >>> requireA "sidebar.markdown" (setFieldA "sidebar" $ arr pageBody) + >>> applyTemplateCompiler "templates/tutorial.html" >>> applyTemplateCompiler "templates/default.html" >>> relativizeUrlsCompiler + -- Tutorial list + match "tutorials.html" $ route idRoute + create "tutorials.html" $ constA mempty + >>> arr (setField "title" "Tutorials") + >>> setFieldPageList chronological + "templates/tutorial-item.html" "tutorials" "tutorials/*" + >>> requireA "sidebar.markdown" (setFieldA "sidebar" $ arr pageBody) + >>> applyTemplateCompiler "templates/tutorials.html" + >>> applyTemplateCompiler "templates/default.html" + >>> relativizeUrlsCompiler + -- Sidebar match "sidebar.markdown" $ compile pageCompiler @@ -40,7 +52,7 @@ main = hakyll $ do where withToc = defaultHakyllWriterOptions { writerTableOfContents = True - , writerTemplate = "

Table of contents

\n$toc$\n$body$" + , writerTemplate = "$toc$\n$body$" , writerStandalone = True } diff --git a/web/index.markdown b/web/index.markdown index ee44cf3..a65a5c5 100644 --- a/web/index.markdown +++ b/web/index.markdown @@ -2,7 +2,7 @@ title: Home --- -## Overview +# Overview Hakyll is a [Haskell](http://haskell.org) library for generating static sites, mostly aimed at small-to-medium sites and personal blogs. It is written in a @@ -12,32 +12,32 @@ configuration. Integration with [pandoc](http://johnmacfarlane.net/pandoc/) gives us markdown and TeX support, including syntax highlighting and other goodies. -## The Hakyll System +# The Hakyll System -### Write your content in whatever format you prefer +## Write your content in whatever format you prefer ![Write your content](/images/hakyll-system-1.png) -### Create compilation rules in a Haskell EDSL +## Create compilation rules in a Haskell EDSL ![Write your rules](/images/hakyll-system-2.png) -### Compile it to HTML and upload it! +## Compile it to HTML and upload it! ![Compile it](/images/hakyll-system-3.png) -## Hakyll 3 +# Hakyll 3 Hakyll 3 has been released, and it can be installed by running `cabal install hakyll`. For a limited time (but as long as is necessary) you can access the old site and documentation [here](/hakyll2). -## Getting Started +# Getting Started You can get the latest version from hackage using `cabal install hakyll`. Then, you can: -- read the [tutorial](/tutorial.html); +- read the [tutorials](/tutorials.html); - mail the [google discussion group](http://groups.google.com/group/hakyll); - ask questions on the IRC channel: `#hakyll` on [freenode](http://freenode.net/). diff --git a/web/philosophy.markdown b/web/philosophy.markdown index 07a20c3..056472b 100644 --- a/web/philosophy.markdown +++ b/web/philosophy.markdown @@ -2,25 +2,25 @@ title: Philosophy --- -## Small-to-medium sites +# Small-to-medium sites Hakyll was written to be used for small-to-medium sites. You can do some advanced things with it, but don't use it to build a big online shop. -## Hakyll.hs +# Hakyll.hs It should be possible to put all configuration in one file, so data and configuration can be strictly separated. In addition, we think this file should never exceed a 100 lines of code. -## High-level +# High-level Hakyll tries to provide as many high-level functions as possible for common tasks, while the lower-level functions should also be accessible. If you think you're writing something that can be used for many sites, please send a patch, or your `hakyll.hs`, and we will see what we can do. -## Well-documented +# Well-documented A key to being easy-to-use is documentation. That's why we try to provide as many working examples as possible. If you ever create a site using hakyll, diff --git a/web/reference.markdown b/web/reference.markdown index 9b4d9e4..450f493 100644 --- a/web/reference.markdown +++ b/web/reference.markdown @@ -2,7 +2,7 @@ title: Reference --- -## Reference +# Reference We keep a copy of the reference of the latest stable version here. This reference is automatically generated by diff --git a/web/sidebar.markdown b/web/sidebar.markdown index 8396c75..24f44b7 100644 --- a/web/sidebar.markdown +++ b/web/sidebar.markdown @@ -1,9 +1,9 @@ -## Navigation +# Navigation [home](/index.html) [philosophy](/philosophy.html) [about](/about.html) -[tutorial](/tutorial.html) +[tutorials](/tutorials.html) [examples](/examples.html) [reference](/reference.html) [changelog](/changelog.html) diff --git a/web/templates/default.html b/web/templates/default.html index 040292c..78845e5 100644 --- a/web/templates/default.html +++ b/web/templates/default.html @@ -34,7 +34,7 @@