hakyll-1.2: A simple static site generator library.Source codeContentsIndex
Text.Hakyll.Tags
Description

Module containing some specialized functions to deal with tags. This Module follows certain conventions. Stick with them.

More concrete: all functions in this module assume that the tags are located in the tags field, and separated by commas. An example file foo.markdown could look like:

 ---
 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...

All the following functions would work with such a format.

Synopsis
readTagMap :: String -> [FilePath] -> Hakyll (Map String [FilePath])
renderTagCloud :: Map String [FilePath] -> (String -> String) -> Float -> Float -> String
renderTagLinks :: (String -> String) -> ContextManipulation
Documentation
readTagMapSource
:: StringUnique identifier for the tagmap.
-> [FilePath]
-> Hakyll (Map String [FilePath])

Read a tag map. This creates a map from tags to page paths.

You also have to give a unique identifier for every tagmap. This is for caching reasons, so the tagmap will be stored in _cache_tagmapidentifier.

renderTagCloudSource
:: Map String [FilePath]Map as produced by readTagMap.
-> String -> StringFunction to produce an url for a tag.
-> FloatSmallest font size, in percent.
-> FloatBiggest font size, in percent.
-> StringResult of the render.
Render a tag cloud.
renderTagLinksSource
:: String -> StringFunction to produce an url for a tag.
-> ContextManipulation

Render all tags to links.

On your site, it is nice if you can display the tags on a page, but naturally, most people would expect these are clickable.

So, this function takes a function to produce an url for a given tag, and applies it on all tags.

Note that it is your own responsibility to ensure a page with such an url exists.

Produced by Haddock version 2.6.0