Hakyll - $title$
+ Hakyll - $title$Tutorial: $title$
-Helping out
+$body$ + +Other tutorials
+ +The other tutorials can be found here. + +Helping out
Hakyll is an open source project, and one of the hardest parts is writing correct, up-to-date, and understandable documentation. Therefore, the authors would really appreciate it if you would -give some feedback about +give feedback about the tutorials, and especially report errors or difficulties you encountered. Thanks! + +If you run into any problems, all questions are welcome in the above google +group, or you could try the IRC channel,#hakyll
on
+freenode.
diff --git a/web/templates/tutorialitem.html b/web/templates/tutorialitem.html
deleted file mode 100644
index 01fb298..0000000
--- a/web/templates/tutorialitem.html
+++ /dev/null
@@ -1,3 +0,0 @@
-Tutorials about Hakyll
+Tutorials about Hakyll
Here is a list of tutorials I've written about Hakyll:
-
- $body
+ $tutorials$
All these tutorials assume you are using the latest stable version of diff --git a/web/tutorials/01-installation.markdown b/web/tutorials/01-installation.markdown new file mode 100644 index 0000000..5f763e5 --- /dev/null +++ b/web/tutorials/01-installation.markdown @@ -0,0 +1,36 @@ +--- +title: Installation +--- + +Why static websites? +-------------------- + +Modern web frameworks make it easy to create huge dynamic websites. Why would +anyone still care about a static website? + +- Static websites are fast, because it's simply files served directly from the + hard disk. +- Static websites are secure. Nobody has ever found an SQL injection in static + pages. +- Static websites are easy to deploy. Just copy them to your webhost using + (S)FTP/rsync/scp and you are done. They work on all webhosts: no CGI or extra + modules needed for the web server. + +Why Hakyll? +----------- + +Hakyll is a [Haskell] library meant for creating small-to-medium sized static +websites. It is a powerful publishing tool, precisely because of the power of +Haskell. By using the awesome [pandoc] library, it is able to create your +website from a large variety of input formats. + +[Haskell]: http://haskell.org/ +[pandoc]: http://johnmacfarlane.net/pandoc/ + +Features include: + +- easy templating system; +- a simple HTTP server for previewing and compiling your website on the go; +- powerful syntax highlighting; +- modules for common items such as tags and feeds; +- easily extensible. diff --git a/web/tutorial.markdown b/web/tutorials/02-basics.markdown similarity index 74% rename from web/tutorial.markdown rename to web/tutorials/02-basics.markdown index dfdf73d..bebc452 100644 --- a/web/tutorial.markdown +++ b/web/tutorials/02-basics.markdown @@ -1,42 +1,8 @@ --- -title: Tutorial +title: The basics --- -Why static websites? --------------------- - -Modern web frameworks make it easy to create huge dynamic websites. Why would -anyone still care about a static website? - -- Static websites are fast, because it's simply files served directly from the - hard disk. -- Static websites are secure. Nobody has ever found an SQL injection in static - pages. -- Static websites are easy to deploy. Just copy them to your webhost using - (S)FTP/rsync/scp and you are done. They work on all webhosts: no CGI or extra - modules needed for the web server. - -Why Hakyll? ------------ - -Hakyll is a [Haskell] library meant for creating small-to-medium sized static -websites. It is a powerful publishing tool, precisely because of the power of -Haskell. By using the awesome [pandoc] library, it is able to create your -website from a large variety of input formats. - -[Haskell]: http://haskell.org/ -[pandoc]: http://johnmacfarlane.net/pandoc/ - -Features include: - -- easy templating system; -- a simple HTTP server for previewing and compiling your website on the go; -- powerful syntax highlighting; -- modules for common items such as tags and feeds; -- easily extensible. - -Let's get started! ------------------- +## Let's get started! We're going to discuss a small brochure site to start with. You can find all code and files necessary to build this site @@ -83,7 +49,7 @@ look in the directory you cloned or downloaded. [brochure-hakyll.hs]: http://github.com/jaspervdj/hakyll-examples/blob/master/brochure/hakyll.hs -### Images +## Images Let's start of with the `images/haskell-logo.png` file, because the processing of this file is very simple: it is simply copied to the output directory. Let's @@ -122,7 +88,7 @@ content at all, we just copy the file. [copyFileCompiler]: /reference/Hakyll-Core-Writable-CopyFile.html#v:copyFileCompiler -### CSS +## CSS If we look at how the two CSS files are processed, we see something which looks very familiar: @@ -154,7 +120,7 @@ We can wonder what Hakyll does with the resulting `String`. Well, it simply writes this to the file specified in the `route`! As you can see, routes and compilers work together to produce your site. -### Templates +## Templates Next, we can see that the templates are compiled: @@ -168,12 +134,12 @@ good impression: ~~~~~
-