fixup some leftovers in link creation
This commit is contained in:
parent
d4e1fdeaeb
commit
8d2c3c229c
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
mount: /
|
mount: /
|
||||||
|
redirects:
|
||||||
|
- also_index
|
||||||
title: Home
|
title: Home
|
||||||
toc: off
|
toc: off
|
||||||
timestamp: null
|
timestamp: null
|
||||||
|
|
|
@ -280,7 +280,8 @@ installPage mount pi = do
|
||||||
|
|
||||||
{- | Install a simple redirect handler page. -}
|
{- | Install a simple redirect handler page. -}
|
||||||
installRedirect :: FilePath -> FilePath -> Site ()
|
installRedirect :: FilePath -> FilePath -> Site ()
|
||||||
installRedirect target from = do
|
installRedirect target' from = do
|
||||||
|
target <- rootPageUrl target'
|
||||||
tname <- use redirectTemplate
|
tname <- use redirectTemplate
|
||||||
templ <- use $ templates . to (M.! fromString tname)
|
templ <- use $ templates . to (M.! fromString tname)
|
||||||
file <- indexFilename from
|
file <- indexFilename from
|
||||||
|
@ -298,8 +299,7 @@ installPageRedirects :: FilePath -> PageInfo -> Site ()
|
||||||
installPageRedirects target pi = do
|
installPageRedirects target pi = do
|
||||||
traverse_
|
traverse_
|
||||||
(installRedirect target)
|
(installRedirect target)
|
||||||
(pi ^.. pageMeta . key "redirects" . values . _String . to T.unpack .
|
(pi ^.. pageMeta . key "redirects" . values . _String . to T.unpack)
|
||||||
to unAbsolute)
|
|
||||||
|
|
||||||
-- | Find the path to the file of a given hash
|
-- | Find the path to the file of a given hash
|
||||||
dataFilename :: String -> FilePath -> Site (FilePath, FilePath)
|
dataFilename :: String -> FilePath -> Site (FilePath, FilePath)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<div id="search_fail" style="display: none">
|
<div id="search_fail" style="display: none">
|
||||||
<h1>No results found</h1>
|
<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>
|
||||||
|
|
||||||
<div id="search_error" style="display: none">
|
<div id="search_error" style="display: none">
|
||||||
|
|
Loading…
Reference in a new issue