diff options
| author | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-08-02 13:56:11 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-08-02 13:56:11 +0200 |
| commit | 8d2c3c229cc4b3025de70a4892ad99c6be33caa2 (patch) | |
| tree | 7c8ef7b7bd7c4f5a00ff8ed53f15b20ba77fccfc | |
| parent | d4e1fdeaeb898b1686e5831a15ce6e968e66bd7b (diff) | |
| download | reploy-8d2c3c229cc4b3025de70a4892ad99c6be33caa2.tar.gz reploy-8d2c3c229cc4b3025de70a4892ad99c6be33caa2.tar.bz2 | |
fixup some leftovers in link creation
| -rw-r--r-- | pages/index.md | 2 | ||||
| -rw-r--r-- | reploy.hs | 6 | ||||
| -rw-r--r-- | templates/searchresults.html | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/pages/index.md b/pages/index.md index f44e915..38a87df 100644 --- a/pages/index.md +++ b/pages/index.md @@ -1,5 +1,7 @@ --- mount: / +redirects: + - also_index title: Home toc: off timestamp: null @@ -280,7 +280,8 @@ installPage mount pi = do {- | Install a simple redirect handler page. -} installRedirect :: FilePath -> FilePath -> Site () -installRedirect target from = do +installRedirect target' from = do + target <- rootPageUrl target' tname <- use redirectTemplate templ <- use $ templates . to (M.! fromString tname) file <- indexFilename from @@ -298,8 +299,7 @@ installPageRedirects :: FilePath -> PageInfo -> Site () installPageRedirects target pi = do traverse_ (installRedirect target) - (pi ^.. pageMeta . key "redirects" . values . _String . to T.unpack . - to unAbsolute) + (pi ^.. pageMeta . key "redirects" . values . _String . to T.unpack) -- | Find the path to the file of a given hash dataFilename :: String -> FilePath -> Site (FilePath, FilePath) diff --git a/templates/searchresults.html b/templates/searchresults.html index 115369e..5044d0b 100644 --- a/templates/searchresults.html +++ b/templates/searchresults.html @@ -19,7 +19,7 @@ <div id="search_fail" style="display: none"> <h1>No results found</h1> - <p>You may try a simpler search query, or find the page <a href="{{root}}tag">by the categories</a>.</p> + <p>You may try a simpler search query, or find the page <a href="{{#pageLink}}tag{{/pageLink}}">by the categories</a>.</p> </div> <div id="search_error" style="display: none"> |
