HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehakyll-4.17.0.0Haskell2010

Hakyll.Web.Tags

This module containing some specialized functions to deal with tags. It assumes you follow some conventions.

We support two types of tags: tags and categories.

To use default tags, use buildTags. Tags are placed in a comma-separated metadata field like this:

---
author: Philip K. Dick
title: Do androids dream of electric sheep?
tags: future, science fiction, humanoid
---
The novel is set in a post-apocalyptic near future, where the Earth and
its populations have been damaged greatly by Nuclear...

To use categories, use the buildCategories function. Categories are determined by the directory a page is in, for example, the post

posts/coding/2010-01-28-hakyll-categories.markdown

will receive the coding category.

Advanced users may implement custom systems using buildTagsWith if desired.

In the above example, we would want to create a page which lists all pages in the coding category, for example, with the Identifier:

tags/coding.html

This is where the first parameter of buildTags and buildCategories comes in. In the above case, we used the function:

fromCapture "tags/*.html" :: String -> Identifier

The tagsRules function lets you generate such a page for each tag in the Rules monad.

  • 1 type
  • 19 values
  • Packagehakyll-4.17.0.0
  • Exports20
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTags.hs
valuegetTags :: MonadMetadata m => Identifier -> m [String]
#

Obtain tags from a page in the default way: parse them from the tags metadata field. This can either be a list or a comma-separated string.