today after reading some blog post about web development I've got idea
to look for some static site generators and after being exposed to
some Python/Ruby stuff, I've finally come to Hakyll.
At the moment I have to fiddle with Python/Django trying to put
together some simple site for our small 'company'
(counseling/homeopathy clinic) by using Django-CMS.
Since I'm learning Haskell and plan to use it for some desktop
project, I am naturally interested to use it for web stuff as
well. Nothing complicated, one site for the business needs and one
blog-like for personal stuff.
I'm also following web-devel mailing list where there is lot of
discussion about the future of web development using Haskell, but, so
far, all the frameworks (Happs, Yesod, etc.) are not documented well
and look quite scary or, let's say, too complicated. :-(
That's why idea of static site generator written in Haskell is so
refreshing and encouraging. Moreover, I see that docs is also not
absent. :-)
However, before venturing into the adventure of installing it on my
system, I'd like to resolve some questions whether Hakyll is
appropriate solution for our needs...
So, we need the following and wonder how suitable Hakyll is for:
a) small-to-medium web site
b) relatively simple layout of the pages using some pictures etc.
c) having forms for ordering services which email form-data to us
after being submitted by the clients
d) is it possible to easily deploy some JS lib (e.g. Dojo etc.) to
enhance look of the pages/forms in b) & c)?
e) generating RSS feeds
f) having some kind of 'news' application which, I believe, can be
done via blog without comments
g) ability to write pages using reST (I know that pandoc does not
support the whole spec, but recently support for reST tables is added,
iirc.)
h) using some CSS framework for templating the whole site
I believe, that's, more or less, everything we need for our site,
which we try to implement at the moment with Django-CMS.
So, how does Hakyll 'scale' for the above mentioned items?
Sincerely,
Gour
--
Gour | Hlapicina, Croatia | GPG key: F96FF5F6
----------------------------------------------------------------
I'm glad you're interested in Hakyll, and I have to say -- this must
be the most challenging site one has ever tried to tackle with Hakyll.
(a), (b), (d), (e), (g), (h) are certainly possible. (c) and (f) are a
little more difficult.
(a): That's what Hakyll is made for :-)
(b): You usually write your layouts in HTML, so you can have whatever
layout you want.
(c): Hakyll is a static site generator. It doesn't do CGI or anything.
You can use it to generate forms, but you will have to use something
else to actually send out the mails.
(d): Sure. I use some jquery on my own site. You just need to put it
in the <head> of the main template, so the libraries get included on
every page.
(e): There's a tutorial on how to do RSS feeds in Hakyll online.
However, this will be way easier in Hakyll-2.x, which I expect to be
out in about two weeks or so.
(f): I'm not sure what you mean here. You can easily generate a blog
using Hakyll, but it doesn't support comments -- so I guess that's
alright? You can always use something like Disqus for comments.
(g): Hakyll supports anything that Pandoc supports. Files with a
`.rst` extension will interpreted as reStructuredText.
(h): I don't have any experience with CSS frameworks. But I'm pretty
sure this should work the usual way.
Hope this helps,
Kind regards,
Jasper Van der Jeugt
Hello Jasper,
Jasper> I'm glad you're interested in Hakyll, and I have to say -- this
Jasper> must be the most challenging site one has ever tried to tackle
Jasper> with Hakyll.
Heh, 2.0 is arriving and spring is the time to extend Hakyll. :-)
Jasper> (a), (b), (d), (e), (g), (h) are certainly possible.
Good.
Jasper> (c) and (f) are a little more difficult.
But, hopefully, still possible. ;)
Jasper> (a): That's what Hakyll is made for :-)
Fine. I believe we won't cross the 'medium' border.
Jasper> (b): You usually write your layouts in HTML, so you can have
Jasper> whatever layout you want.
Nice. I have to read more about templating 'engine'.
Jasper> (c): Hakyll is a static site generator. It doesn't do CGI or
Jasper> anything. You can use it to generate forms, but you will have
Jasper> to use something else to actually send out the mails.
Yeah, some old-style formmail cgi script or maybe there is something
available in Haskell as well to be more secure than those old Perl
scripts.
Previously I was thinking about using some e-shop like Django's
Satchmo, but it complicates the whole stuff. The point is that we need
to accept order for our services via Internet, so I was thinking about
having e-shop with credit card authorization, but recently I got info
that service provider here enables us to 'manually' authorize credit
card payments via web terminal after receiving customer's data with
the 'order' info. That's why having simple/JS-decorated HTML form with
CGI script which submits its data via email looks as simple-enough
solution instead of becoming immersed in Django's ecommerce stuff. :-)
There are more interesting things to do in life than web
development. ;)
Jasper> (d): Sure. I use some jquery on my own site. You just need to
Jasper> put it in the <head> of the main template, so the libraries get
Jasper> included on every page.
Great. I'm thinking about Dojo.
Jasper> (e): There's a tutorial on how to do RSS feeds in Hakyll online.
I'm going to read all the tutorials...
Jasper> However, this will be way easier in Hakyll-2.x, which I expect
Jasper> to be out in about two weeks or so.
Wonderful!
Jasper> (f): I'm not sure what you mean here. You can easily generate a
Jasper> blog using Hakyll, but it doesn't support comments -- so I
Jasper> guess that's alright?
Yes, blog without comments sounds good, i.e. just posting some 'news'
from time to time to make the web site dynamic. :-D
Jasper> You can always use something like Disqus for comments.
I believe that we'll use Blog + Disqus for personal (blog) site.
Jasper> (g): Hakyll supports anything that Pandoc supports. Files with a
Jasper> `.rst` extension will interpreted as reStructuredText.
I believe that with the recent additions to Pandoc it will be
good-enough. Otherwise, we can go back to Markdown, although I prefer
reST since I'm using it for other writings and plan to use it for
documenting some software (along with Sphinx for pdf/html generation).
Jasper> (h): I don't have any experience with CSS frameworks. But I'm
Jasper> pretty sure this should work the usual way.
Cool. I'll also try to play with some framework. It's mostly question
to provide HTML template along with appropriate CSS.
Jasper> Hope this helps,
Yes, thanks a lot. It is very encouraging and it seems as God-send. ;)
I'm really thrilled with Hakyll and I believe you will get a 'business'
site done in Hakyll soon. :-D