hakyll-4.16.2.2: A static website compiler library

Safe Haskell | Safe-Inferred
Language | Haskell2010

Hakyll.Web.Pandoc.Biblio

Description

Wraps pandocs bibiliography handling

In order to add a bibliography, you will need a bibliography file (e.g. `.bib`) and a CSL file (`.csl`). Both need to be compiled with their respective compilers (`biblioCompiler` and `cslCompiler`). Then, you can refer to these files when you use `readPandocBiblio`. This function also takes the reader options for completeness -- you can use `defaultHakyllReaderOptions` if you're unsure. If you already read the source into a `Pandoc` type and need to add processing for the bibliography, you can use `processPandocBiblio` instead. `pandocBiblioCompiler` is a convenience wrapper which works like `pandocCompiler`, but also takes paths to compiled bibliography and csl files; `pandocBibliosCompiler` is similar but instead takes a glob pattern for bib files.

Synopsis

- newtype CSL = CSL {
  - unCSL :: ByteString
  }
- cslCompiler :: Compiler (Item CSL)
- newtype Biblio = Biblio {
  - unBiblio :: ByteString
  }
- biblioCompiler :: Compiler (Item Biblio)
- readPandocBiblio :: ReaderOptions -> Item CSL -> Item Biblio -> Item String -> Compiler (Item Pandoc)
- readPandocBiblios :: ReaderOptions -> Item CSL -> [Item Biblio] -> Item String -> Compiler (Item Pandoc)
- processPandocBiblio :: Item CSL -> Item Biblio -> Item Pandoc -> Compiler (Item Pandoc)
- processPandocBiblios :: Item CSL -> [Item Biblio] -> Item Pandoc -> Compiler (Item Pandoc)
- pandocBiblioCompiler :: String -> String -> Compiler (Item String)
- pandocBibliosCompiler :: String -> String -> Compiler (Item String)

# Documentation

newtype CSL Source #

Constructors

CSL |

Fields

- unCSL :: ByteString

#### Instances

Instances details

Show CSL Source # |
Instance details Defined in Hakyll.Web.Pandoc.Biblio Methods showsPrec :: Int -> CSL -> ShowS Source # show :: CSL -> String Source # showList :: [CSL] -> ShowS Source #
Binary CSL Source # |
Instance details Defined in Hakyll.Web.Pandoc.Biblio Methods put :: CSL -> Put Source # get :: Get CSL Source # putList :: [CSL] -> Put Source #
Writable CSL Source # |
Instance details Defined in Hakyll.Web.Pandoc.Biblio Methods write :: FilePath -> Item CSL -> IO () Source #

cslCompiler :: Compiler (Item CSL) Source #

newtype Biblio Source #

Constructors

Biblio |

Fields

- unBiblio :: ByteString

#### Instances

Instances details

Show Biblio Source # |
Instance details Defined in Hakyll.Web.Pandoc.Biblio Methods showsPrec :: Int -> Biblio -> ShowS Source # show :: Biblio -> String Source # showList :: [Biblio] -> ShowS Source #
Binary Biblio Source # |
Instance details Defined in Hakyll.Web.Pandoc.Biblio Methods put :: Biblio -> Put Source # get :: Get Biblio Source # putList :: [Biblio] -> Put Source #
Writable Biblio Source # |
Instance details Defined in Hakyll.Web.Pandoc.Biblio Methods write :: FilePath -> Item Biblio -> IO () Source #

biblioCompiler :: Compiler (Item Biblio) Source #

readPandocBiblio :: ReaderOptions -> Item CSL -> Item Biblio -> Item String -> Compiler (Item Pandoc) Source #

readPandocBiblios :: ReaderOptions -> Item CSL -> [Item Biblio] -> Item String -> Compiler (Item Pandoc) Source #

processPandocBiblio :: Item CSL -> Item Biblio -> Item Pandoc -> Compiler (Item Pandoc) Source #

processPandocBiblios :: Item CSL -> [Item Biblio] -> Item Pandoc -> Compiler (Item Pandoc) Source #

pandocBiblioCompiler :: String -> String -> Compiler (Item String) Source #

Compiles a markdown file via Pandoc. Requires the .csl and .bib files to be known to the compiler via match statements.

pandocBibliosCompiler :: String -> String -> Compiler (Item String) Source #

Compiles a markdown file via Pandoc. Requires the .csl and .bib files to be known to the compiler via match statements.