hakyll-4.13.4.0: A static website compiler library

Safe Haskell | None
Language | Haskell2010

Hakyll.Main

Contents

- Entry points
- Command line argument parsers

Description

Module providing the main hakyll function and command-line argument parsing

Synopsis

- hakyll :: Rules a -> IO ()
- hakyllWith :: Configuration -> Rules a -> IO ()
- hakyllWithArgs :: Configuration -> Options -> Rules a -> IO ()
- hakyllWithExitCode :: Configuration -> Rules a -> IO ExitCode
- hakyllWithExitCodeAndArgs :: Configuration -> Options -> Rules a -> IO ExitCode
- data Options = Options {
  - verbosity :: Bool
  - optCommand :: Command
  }
- data Command
  - = Build
  - | Check {
    - internal_links :: Bool
    }
  - | Clean
  - | Deploy
  - | Preview {
    - port :: Int
    }
  - | Rebuild
  - | Server {
    - host :: String
    - port :: Int
    }
  - | Watch {
    - host :: String
    - port :: Int
    - no_server :: Bool
    }
- optionParser :: Configuration -> Parser Options
- commandParser :: Configuration -> Parser Command
- defaultParser :: Configuration -> IO Options
- defaultParserPure :: Configuration -> [String] -> ParserResult Options
- defaultParserPrefs :: ParserPrefs
- defaultParserInfo :: Configuration -> ParserInfo Options

# Entry points

hakyll :: Rules a -> IO () Source #

This usually is the function with which the user runs the hakyll compiler

hakyllWith :: Configuration -> Rules a -> IO () Source #

A variant of `hakyll` which allows the user to specify a custom configuration

hakyllWithArgs :: Configuration -> Options -> Rules a -> IO () Source #

A variant of `hakyll` which expects a `Configuration` and command-line `Options`. This gives freedom to implement your own parsing.

hakyllWithExitCode :: Configuration -> Rules a -> IO ExitCode Source #

A variant of `hakyll` which returns an `ExitCode`

hakyllWithExitCodeAndArgs :: Configuration -> Options -> Rules a -> IO ExitCode Source #

# Command line argument parsers

data Options Source #

The parsed command-line options.

Constructors

Options |

Fields

- verbosity :: Bool
- optCommand :: Command

#### Instances

Instances details

Show Options Source # |
Instance details Defined in Hakyll.Main Methods showsPrec :: Int -> Options -> ShowS Source # show :: Options -> String Source # showList :: [Options] -> ShowS Source #

data Command Source #

The command to run.

Constructors

Build | Generate the site.
Check | Validate the site output.

Fields

- internal_links :: Bool

Clean | Clean up and remove cache.
Deploy | Upload/deploy your site.

Preview

Deprecated: Use Watch instead.

DEPRECATED
  Please use the watch command.

Fields

- port :: Int

Rebuild | Clean and build again.
Server | Start a preview server.

Fields

- host :: String
- port :: Int

Watch | Autocompile on changes and start a preview server.

Fields

- host :: String
- port :: Int
- no_server :: Bool

#### Instances

Instances details

Show Command Source # |
Instance details Defined in Hakyll.Main Methods showsPrec :: Int -> Command -> ShowS Source # show :: Command -> String Source # showList :: [Command] -> ShowS Source #

optionParser :: Configuration -> Parser Options Source #

commandParser :: Configuration -> Parser Command Source #

defaultParser :: Configuration -> IO Options Source #

defaultParserPure :: Configuration -> [String] -> ParserResult Options Source #

defaultParserPrefs :: ParserPrefs Source #

defaultParserInfo :: Configuration -> ParserInfo Options Source #