Questions tagged [hakyll]

A Haskell library for generating static websites

Named with a tip of the hat to , Hakyll is an open source library that generates small to medium sized static websites.

http://jaspervdj.be/hakyll/

74 questions
4
votes
1 answer

Using markdown for templates in Hakyll

Using the skeleton website generated by hakyll-init site_foo, I want to translate site_foo/index.html into markdown and still keep its contents. In other words, have a site_foo/index.markdown that refers to the posts-list template. I do not know…
Yuval Langer
  • 649
  • 1
  • 5
  • 16
4
votes
2 answers

How to use HTML as input to Hakyll

I use Hakyll for my blog. I currently write my posts in emacs org-mode and then have org-mode export to markdown. Then Hakyll turns that markdown into HTML. That works OK but I would like finer-grained control of the HTML that gets posted. What I…
haroldcarr
  • 1,431
  • 13
  • 17
4
votes
2 answers

How to do subdomain routing using Haskell

Using Hakyll that uses snap i started working on a routing server. Given the following code from their tutorials i can see the routing but i would like to have some different applications on their own subdomains like oneapp.mysite.com. Is this…
Deck Pope
  • 225
  • 3
  • 10
4
votes
1 answer

How to link local version of library with cabal

I want to make a local change in Pandoc and recompile Hakyll so that it uses that local change. So, I downloaded the development version of both libraries: git clone https://github.com/jgm/pandoc.git git clone…
Aditya
  • 157
  • 7
3
votes
1 answer

Hakyll tutorial goes wrong

I am following the Hakyll tutorial as in this https://jaspervdj.be/hakyll/tutorials/01-installation.html. But it seems that something is wrong and I can't tell what it is. When I run 'stack init' I get this message. Looking for .cabal or…
Josh Cho
  • 47
  • 2
3
votes
2 answers

How can I make this Haskell development environment in Nix?

I'm trying to make a Haskell development environment for a web project that just has the dependencies hakyll, blaze, and clay. Only, clay appears to fail to build, complaining that Setup: Encountered missing dependencies: hspec >=2.2.0 && <2.6,…
Jonathan
  • 9,074
  • 8
  • 45
  • 80
3
votes
1 answer

Is it possible to use asciidoc with hakyll?

I followed this tutorial to create a basic static web page using hakyll. It includes a number of pages rendered from markdown in the posts directory, e.g. 2015-08-12-spqr.markdown. I prefer asciidoc to markdown, and tried adding an asciidoc…
mherzl
  • 4,119
  • 3
  • 25
  • 51
3
votes
2 answers

Remove teaser from pages

I'm making a website with Hakyll. I successfully created a RSS feed showing showing for each post the teaser section delimited by . My problem is that this teaser section is shown in the full (templated) pages of these posts. And I would…
JeanJouX
  • 2,347
  • 1
  • 22
  • 34
3
votes
0 answers

Navigation sidebar with Hakyll

I'm trying to make a website with Hakyll and bootstrap. I would like to add a navigation sidebar (automatically updated at compilation) on some pages of my website and I'm not sure of how to do it. I searched for tutorials or examples but I didn't…
JeanJouX
  • 2,347
  • 1
  • 22
  • 34
3
votes
3 answers

How to relativize URLs in css files in Hakyll?

In my Hakyll site I have a stylesheet linked into the page: This CSS contains a @font-face directive linking to a font file: @font-face { font-family: "Bla"; src: url("/data/bla.ttf")…
arrowd
  • 30,130
  • 7
  • 72
  • 96
3
votes
1 answer

Hakyll - Using makeItem with data to create a list in HTML

I have a list of categories. Each category itself has a list of sub-categories: [(Category,[SubCategory])]. I would like to get the following HTML output in a single page:

Category 1

  • Subcategory 1
  • Subcategory…
Beerend Lauwers
  • 842
  • 5
  • 14
3
votes
1 answer

Haskell package build error

I created a cabal sandbox and I'm trying to build hakyll Haskell package on my OSX but i get build error on package temporary-1.2.0.2. What can be the reason? cabal version is 1.20 Build error is below: abcdef-MacBook-Pro:hakyll bd$ cabal install…
xyzt
  • 1,013
  • 2
  • 14
  • 32
2
votes
1 answer

Sort Hakyll item list by a custom field

I want to add a custom field to my posts called coolness, like this: --- title: Something coolness: 10 --- and then I want to sort my posts by coolness. How do I do that? I know I can sort by date: posts <- recentFirst =<< loadAll "posts/*" using…
2
votes
1 answer

Custom content on a tags page

I have setup Hakyll to generate basic tag pages from blog posts as follows: main = do hakyll $ do match "preambles/*.md" $ compile $ pandocCompiler >>= relativizeUrls tags <- buildTags "posts/*.md" (fromCapture…
Nigel
  • 1,041
  • 2
  • 8
  • 19
2
votes
2 answers

Conditionally including a field in the context based on each page’s metadata

I’d like to add a field to my Hakyll site’s context. If a certain key is present in the metadata then I’d like to transform the corresponding value and include that in the context. If the key is not present in the metadata then nothing should be…
bdesham
  • 13,980
  • 10
  • 70
  • 116