put link to index in footer of gallery pages

This commit is contained in:
Rhiannon Morris 2020-07-23 19:51:53 +02:00
parent b44fd97029
commit b62586b4ad
5 changed files with 27 additions and 12 deletions

View file

@ -19,6 +19,7 @@ data ModeOptions =
}
| GalleryPage {
files :: [FilePath],
prefix :: FilePath,
nsfw :: Bool,
title :: Text,
output :: Maybe FilePath,
@ -84,7 +85,11 @@ optionsParser = globalOpts `info` mainInfo where
gallery = command "gallery" $ galleryOpts `info` galleryInfo
galleryOpts =
GalleryPage <$> files <*> nsfwG <*> title <*> output <*> dataDir
GalleryPage <$> files <*> prefix <*> nsfwG <*> title <*> output <*> dataDir
prefix = strOption $
short 'p' <> long "prefix" <> metavar "DIR" <>
value "" <>
help "output directory prefix"
files = many $ strArgument $
metavar "FILE..." <> help "yaml files to read"
nsfwG = switch $
@ -110,10 +115,6 @@ optionsParser = globalOpts `info` mainInfo where
dsOpts =
DependSingle <$> file <*> nsfwS <*> output <*> prefix
<*> buildDir <*> dataDir
prefix = strOption $
short 'p' <> long "prefix" <> metavar "DIR" <>
value "" <>
help "output directory prefix"
buildDir = strOption $
short 'B' <> long "build-dir" <> metavar "DIR" <> value "_build" <>
help "build directory (default: _build)"