hakyll-4.13.3.0: A static website compiler library

Safe HaskellSafe
LanguageHaskell2010

Hakyll.Core.Configuration

Description

Exports a datastructure for the top-level hakyll configuration

Synopsis

Documentation

data Configuration Source #

Constructors

Configuration 

Fields

  • destinationDirectory :: FilePath

    Directory in which the output written

  • storeDirectory :: FilePath

    Directory where hakyll's internal store is kept

  • tmpDirectory :: FilePath

    Directory in which some temporary files will be kept

  • providerDirectory :: FilePath

    Directory where hakyll finds the files to compile. This is . by default.

  • ignoreFile :: FilePath -> Bool

    Function to determine ignored files

    In defaultConfiguration, the following files are ignored:

    • files starting with a .
    • files starting with a #
    • files ending with a ~
    • files ending with .swp

    Note that the files in destinationDirectory and storeDirectory will also be ignored. Note that this is the configuration parameter, if you want to use the test, you should use shouldIgnoreFile.

  • deployCommand :: String

    Here, you can plug in a system command to upload/deploy your site.

    Example:

    rsync -ave 'ssh -p 2217' _site jaspervdj@jaspervdj.be:hakyll

    You can execute this by using

    ./site deploy
  • deploySite :: Configuration -> IO ExitCode

    Function to deploy the site from Haskell.

    By default, this command executes the shell command stored in deployCommand. If you override it, deployCommand will not be used implicitely.

    The Configuration object is passed as a parameter to this function.

  • inMemoryCache :: Bool

    Use an in-memory cache for items. This is faster but uses more memory.

  • previewHost :: String

    Override default host for preview server. Default is "127.0.0.1", which binds only on the loopback address. One can also override the host as a command line argument: ./site preview -h "0.0.0.0"

  • previewPort :: Int

    Override default port for preview server. Default is 8000. One can also override the port as a command line argument: ./site preview -p 1234

Instances
Default Configuration Source # 
Instance details

Defined in Hakyll.Core.Configuration

Methods

def :: Configuration #

shouldIgnoreFile :: Configuration -> FilePath -> IO Bool Source #

Check if a file should be ignored

defaultConfiguration :: Configuration Source #

Default configuration for a hakyll application