summaryrefslogtreecommitdiff
path: root/src/Hakyll/Paper.hs
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2026-08-20 08:53:59 -0400
committerChris Wells <chris@mathematicaster.org>2026-08-20 08:53:59 -0400
commite323135f5f857a731657601c23cd4dfb3cb5d7d7 (patch)
tree96e8a0ce61ad3cac05c15bbd60123e34dcc83eab /src/Hakyll/Paper.hs
parentd955dfbfcb2c0ef1dc8056a02eb9b0e81e2de01a (diff)
downloadmain-e323135f5f857a731657601c23cd4dfb3cb5d7d7.tar
main-e323135f5f857a731657601c23cd4dfb3cb5d7d7.tar.gz
main-e323135f5f857a731657601c23cd4dfb3cb5d7d7.tar.bz2
main-e323135f5f857a731657601c23cd4dfb3cb5d7d7.tar.lz
main-e323135f5f857a731657601c23cd4dfb3cb5d7d7.tar.xz
main-e323135f5f857a731657601c23cd4dfb3cb5d7d7.tar.zst
main-e323135f5f857a731657601c23cd4dfb3cb5d7d7.zip
Fixed the extra links in papers
Diffstat (limited to 'src/Hakyll/Paper.hs')
-rw-r--r--src/Hakyll/Paper.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Hakyll/Paper.hs b/src/Hakyll/Paper.hs
index 06c45d0..5cc9620 100644
--- a/src/Hakyll/Paper.hs
+++ b/src/Hakyll/Paper.hs
@@ -43,7 +43,7 @@ paperCtxt fctxt = fold $
let k = sluggedKey $ itemBody i
ident = toFilePath $ itemIdentifier i
getMatches (fromString $ ident <> "/index.*") >>= witherM (fmap (>>= parseRelativeReference) . getRoute) >>= \case
- (x:_) -> pure $ show x
+ (x:_) -> pure $ "/" <> show x
_ -> fail $ "No extra for " <> k
]
@@ -106,7 +106,7 @@ eprintCtxt = fold $
]
findLocal :: (StringConv a String, StringConv String a) => Item (Paper a) -> Compiler [Eprint a]
-findLocal (Item ident paper) = getMatches (getPattern potentialPdfs) >>= witherM (fmap (>>= parseRelativeReference) . getRoute) >>= pure . fmap (OtherEprint (toSL ".pdf"))
+findLocal (Item ident paper) = getMatches (getPattern potentialPdfs) >>= witherM (fmap (>>= (parseRelativeReference . ("/" <>))) . getRoute) >>= pure . fmap (OtherEprint (toSL ".pdf"))
where
fp :: FilePath
fp = toFilePath ident