aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2025-01-29 20:48:41 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2025-01-29 20:48:41 +0100
commit540055fb7424ad345aaf33c294f40ec4b4f38f1d (patch)
tree5cd4abef454bb063d6ef560c818354b72e313606
parenteeb49be54a981b3a92cd518a984c59f547ac14d6 (diff)
downloadreploy-540055fb7424ad345aaf33c294f40ec4b4f38f1d.tar.gz
reploy-540055fb7424ad345aaf33c294f40ec4b4f38f1d.tar.bz2
be nice and use metavars in --help
-rw-r--r--Types.hs18
1 files changed, 17 insertions, 1 deletions
diff --git a/Types.hs b/Types.hs
index 78f0013..6503a05 100644
--- a/Types.hs
+++ b/Types.hs
@@ -88,6 +88,7 @@ siteOptions' = do
strOption
$ long "output"
<> short 'd'
+ <> metavar "OUTDIR"
<> help "Directory to render the site to"
<> value "_site"
<> showDefault
@@ -95,28 +96,33 @@ siteOptions' = do
Just
<$> (strOption
$ long "search-data-output"
+ <> metavar "JSON"
<> help "Output JSON with searchable page data to this file")
<|> pure Nothing
_assetDirs <-
many . strOption
$ long "assets"
<> short 'a'
+ <> metavar "DIR"
<> help
"Assets directory to be copied verbatim (possibly multiple paths)"
_sourceDirs <-
many . strOption
$ long "source-directory"
<> short 's'
+ <> metavar "DIR"
<> help
"Path to the directory with source data (possibly multiple paths)"
_notSourceDirs <-
many . strOption
$ long "exclude-source-directory"
+ <> metavar "EXCLUDE"
<> help
"Names of subdirectories of the sources that should never be used for sourcing pages (possibly multiple directory names)"
_tagMetaFile <-
strOption
$ long "tag-metadata-file"
+ <> metavar "FILENAME"
<> help "Name of files with tag metadata"
<> value "tag-metadata.yml"
<> showDefault
@@ -124,11 +130,13 @@ siteOptions' = do
many . strOption
$ long "template-directory"
<> short 't'
+ <> metavar "DIR"
<> help
"Path to the directory with templates (possibly multiple paths)"
_defaultTemplate <-
strOption
$ long "default-template"
+ <> metavar "FILENAME"
<> help
"Default template to use for stuff (as found in templates directory)"
<> value "default.html"
@@ -136,24 +144,28 @@ siteOptions' = do
_redirectTemplate <-
strOption
$ long "redirect-template"
+ <> metavar "FILENAME"
<> help "Template for making redirect pages"
<> value "redirect.html"
<> showDefault
_tagTemplate <-
strOption
$ long "tag-template"
+ <> metavar "FILENAME"
<> help "Template for making category view pages"
<> value "tag.html"
<> showDefault
_listTemplate <-
strOption
$ long "list-template"
+ <> metavar "FILENAME"
<> help "Template for making tag-listing pages"
<> value "list.html"
<> showDefault
_metadataSuffix <-
strOption
$ long "metadata-suffix"
+ <> metavar "SUFFIX"
<> help
"Suffix for YAML files with base metadata for each markdown page. Metadata from files override the extra metadata specified on commandline, but are overridden by metadata specified directly in the markdown header of the pages."
<> value ".metadata.yml"
@@ -164,11 +176,13 @@ siteOptions' = do
[ fmap MetaSpecInline . strOption
$ long "extra-metadata"
<> short 'e'
+ <> metavar "YAML"
<> help
"Extra metadata to add to pages rendering in YAML format. May be specified multiple times."
, fmap MetaSpecFile . strOption
$ long "extra-metadata-file"
<> short 'E'
+ <> metavar "FILE"
<> help
"Extra metadata to add to pages rendering, loaded from a YAML file. May be specified multiple times."
]
@@ -176,13 +190,15 @@ siteOptions' = do
strOption
$ long "url-base"
<> short 'u'
+ <> metavar "URL"
<> help "Base absolute URL"
<> value "/"
<> showDefault
_indexFile <-
strOption
$ long "index-filename"
- <> help "Base absolute URL"
+ <> metavar "FILENAME"
+ <> help "Directory index to use for page output."
<> value "index.html"
<> showDefault
_appendUrlIndex <-