aboutsummaryrefslogtreecommitdiff
path: root/Types.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-07-21 20:32:51 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2023-07-21 20:40:25 +0200
commit9834ea90dd3bd9587f97235dda3c96e11444df94 (patch)
tree0c8831e931004f250d3a644b9edc42fc7e7d91e7 /Types.hs
parent4303d67cbcbfb523852b2e38fb09c7f893c58725 (diff)
downloadreploy-9834ea90dd3bd9587f97235dda3c96e11444df94.tar.gz
reploy-9834ea90dd3bd9587f97235dda3c96e11444df94.tar.bz2
allow adding full paths to .../index.html files, fix minor extra stuff
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs19
1 files changed, 12 insertions, 7 deletions
diff --git a/Types.hs b/Types.hs
index 86969b2..bff0491 100644
--- a/Types.hs
+++ b/Types.hs
@@ -13,7 +13,6 @@
- License for the specific language governing permissions and limitations
- under the License.
-}
-
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE RecordWildCards #-}
@@ -76,6 +75,7 @@ data SiteState =
, _listTemplate :: FilePath -- ^ Name of the template for listing pages
, _timestampSuffix :: FilePath -- ^ File to search for a timestamp (e.g., if the prefix is ".ts", a timestamp for file "page.md" will be looked for in "page.md.ts"). These are best autogenerated with a script that sources the data from git or so.
, _urlBase :: FilePath -- ^ "Root route" to prepend to all absolute links.
+ , _appendUrlIndex :: Bool -- ^ Append full @index.html@ to all page URLs
, _dumpFinalState :: Bool -- ^ Triggers printing out the structure when the processing finishes.
}
deriving (Show)
@@ -141,15 +141,20 @@ siteOptions' = do
long "list-template" <>
help "Template for making tag-listing pages" <>
value "list.html" <> showDefault
- _urlBase <-
- strOption $
- long "url-base" <>
- short 'u' <> help "Base absolute URL" <> value "/" <> showDefault
_timestampSuffix <-
strOption $
long "timestamp-prefix" <>
help "Timestamp file suffix for markdowns" <>
value ".timestamp" <> showDefault
+ _urlBase <-
+ strOption $
+ long "url-base" <>
+ short 'u' <> help "Base absolute URL" <> value "/" <> showDefault
+ _appendUrlIndex <-
+ switch $
+ long "append-url-index" <>
+ help
+ "Append 'index.html' to all urls, negating server problems with directory index settings."
_dumpFinalState <-
switch $
long "dump-state" <>
@@ -173,5 +178,5 @@ siteOptions =
info
(siteOptions' <**> helper)
(fullDesc <>
- progDesc "Build a R3 Cards-like site" <>
- header "site - the R3 site builder")
+ progDesc "Build a R3 static site" <>
+ header "reploy - the R3 static site builder")