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
163
votes
6 answers

Git: fatal: Pathspec is in submodule

I'm trying to get TravisCI to automatically deploy my Hakyll static site, according to this guide. Here's how my repo is set up. I have my source branch, which contains my hakyll and markdown files. It builds the html into the _site directory, which…
jmite
  • 7,320
  • 6
  • 32
  • 74
14
votes
2 answers

In Hakyll, how can I generate a tags page?

I'm trying to do something like what's described in this tutorial, i.e., add tags to my Hakyll blog, but instead of generating a page for every tag, just have one page that lists all tags and their posts. So given a Post1 tagged Tag1, and a Post2…
Jonathan
  • 9,074
  • 8
  • 45
  • 80
10
votes
2 answers

stack ghc error "Invalid Option `--make`

I am learning Hakyll a library in Haskell. I need to run ghc --make site.hs However, I instlled ghc with Stack so I can no longer run ghc but instead stack ghc $ stack ghc --make site.hs Invalid option `--make' How am I supposed to compile my…
john mangual
  • 6,258
  • 10
  • 47
  • 85
9
votes
2 answers

What are the comparative advantages and disadvantages of yst and hakyll static website generators?

I maintain an academic website for myself that duplicates a lot of the material that I also put in my cv. To avoid having to maintain multiple files of the same information, and to keep things in sync, I use tex and bib files mostly, and I generate…
brittAnderson
  • 1,278
  • 9
  • 20
8
votes
1 answer

Centering text/pictures in HTML with markdown and pandoc

I am trying to write a post with hakyll in markdown via pandoc. I successfully added some pictures, tables and code blocks with markdown. However, I would like to center my pictures and some text paragraph. Is it possible to center text and pictures…
JeanJouX
  • 2,347
  • 1
  • 22
  • 34
7
votes
1 answer

How do I avoid a dependency cycle when generating a list of recent posts on posts?

So this works: create ["archive.html"] $ do route idRoute compile $ do posts <- (myRecentFirst gitTimes) =<< loadAll "posts/**" let archiveCtx = listField "posts" (postCtx allTags allCategories gitTimes)…
rlpowell
  • 1,070
  • 1
  • 8
  • 11
6
votes
1 answer

What's the root of a Hakyll site?

I see the create function takes a list of Identifiers. ghci λ> :t create create :: [Identifier] -> Rules () -> Rules () What list of identifier should I use to match the root of the site? Eg, I just want to make a single html page that appears…
Mittenchops
  • 15,641
  • 28
  • 103
  • 200
6
votes
2 answers

Modifying the Hakyll example site

I wish to modify the following code so that, rather than producing links to the latest three posts on the site, it reproduces the body of the posts in their entirely, like in a traditional blog. I'm having a bit of difficulty understanding what's…
pgay
  • 85
  • 4
5
votes
0 answers

Automatically redirect from '/folder' to '/folder/index.html' with Hakyll or another issue with relative links

I want to implement static HTML website with multiple languages using Hakyll framework. I didn't come up with better solution than just put default language under website.com route and any other custom language at website.com/en route. Because I'm…
Shersh
  • 8,297
  • 3
  • 27
  • 54
5
votes
2 answers

Stack not resolving dependencies properly

I'm trying to set up Hakyll on a fresh Ubuntu 16.04 instance, but I can't seem to get the Stack-based setup instructions right. Starting out with stack install hakyll, I get: Error: While constructing the build plan, the following exceptions were…
Jules
  • 13,397
  • 12
  • 50
  • 92
5
votes
3 answers

Hakyll generates weird HTML - can anybody explain reason?

I use Hakyll to generate some documentation and I noticed that it has a weird way of closing the HTML tags in the code it generates. There was a page where they said that you must generate the markup as they do, or the layout of your page will be…
Meh
  • 6,366
  • 10
  • 51
  • 73
5
votes
1 answer

How to use Pandoc filter within Hakyll?

I am sorry to ask such a question. But I am really new to Haskell. I searched the Internet for a whole day but didn't find any example. I have a pandoc filter written in python (tikzcd.py). I want to use that filter to process my blog posts. I…
Fang Hung-chien
  • 182
  • 1
  • 9
4
votes
1 answer

How to filter Hakyll posts with a custom metadata

I would like to filter some posts of my website based on a metadata value. I would like to create a specific metadata called status (like title or date) which could take several values (draft, published, archive) : --- title: The title author:…
JeanJouX
  • 2,347
  • 1
  • 22
  • 34
4
votes
1 answer

List of all BibTex entries in a .bib file, to generate Hakyll publication list?

I'm making a personal website with Hakyll, and I'd like to list my publications. I've found this module and this guide for how to print the references from a markdown document at the bottom. The problem with this is, it assumes you've got some…
jmite
  • 7,320
  • 6
  • 32
  • 74
4
votes
0 answers

Hakyll - How can I use the contents of a transformed file in another file transformation?

Let's say I have this Hakyll template:

The archive

This is an archive of all posts.

    $partial("templates/post-list.html")$
Now, I would like to extract the static text and put it in a MarkDown file that is…
Beerend Lauwers
  • 842
  • 5
  • 14
1
2 3 4 5