Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve +watchServer and +previewServer flags #1024

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions hakyll.cabal
Expand Up @@ -104,14 +104,17 @@ Source-Repository head
Flag previewServer
Description: Include the preview server
Default: True
Manual: True

Flag watchServer
Description: Include the watch server
Default: True
Manual: True

Flag checkExternal
Description: Include external link checking
Default: True
Manual: True

Flag buildWebsite
Description: Build the hakyll website
Expand Down
38 changes: 22 additions & 16 deletions lib/Hakyll/Commands.hs
Expand Up @@ -141,24 +141,30 @@ deploy conf = deploySite conf conf
-- | Print a warning message about the preview serving not being enabled
#ifndef PREVIEW_SERVER
previewServerDisabled :: IO ()
previewServerDisabled =
mapM_ putStrLn
[ "PREVIEW SERVER"
, ""
, "The preview server is not enabled in the version of Hakyll. To"
, "enable it, set the flag to True and recompile Hakyll."
, "Alternatively, use an external tool to serve your site directory."
]
previewServerDisabled = mapM_ putStrLn
[ "PREVIEW SERVER"
, ""
, "The preview server is not enabled in this version of Hakyll. To enable"
, "it, toggle the cabal configuration flag to True, for example by adding"
, "the following to your `cabal.project` file:"
, ""
, " constraints: hakyll +previewServer"
, ""
, "Alternatively, use an external tool to serve your site directory."
]
#endif

#ifndef WATCH_SERVER
watchServerDisabled :: IO ()
watchServerDisabled =
mapM_ putStrLn
[ "WATCH SERVER"
, ""
, "The watch server is not enabled in the version of Hakyll. To"
, "enable it, set the flag to True and recompile Hakyll."
, "Alternatively, use an external tool to serve your site directory."
]
watchServerDisabled = mapM_ putStrLn
[ "WATCH SERVER"
, ""
, "The watch server is not enabled in this version of Hakyll. To enable"
, "it, toggle the cabal configuration flag to True, for example by adding"
, "the following to your `cabal.project` file:"
, ""
, " constraints: hakyll +watchServer"
, ""
, "Alternatively, use an external tool to serve your site directory."
]
#endif