diff options
-rw-r--r-- | hakyll.cabal | 14 | ||||
-rw-r--r-- | src/Hakyll/Web/Html.hs | 11 | ||||
-rw-r--r-- | src/Hakyll/Web/Pandoc/Biblio.hs | 2 | ||||
-rw-r--r-- | web/examples.markdown | 2 | ||||
-rw-r--r-- | web/releases.markdown | 6 |
5 files changed, 26 insertions, 9 deletions
diff --git a/hakyll.cabal b/hakyll.cabal index 0f0398f..3164a77 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -1,5 +1,5 @@ Name: hakyll -Version: 4.6.0.0 +Version: 4.5.4.0 Synopsis: A static website compiler library Description: @@ -154,11 +154,11 @@ Library filepath >= 1.0 && < 1.4, lrucache >= 1.1.1 && < 1.2, mtl >= 1 && < 2.3, - network >= 2.4 && < 2.6, + network >= 2.4 && < 2.7, old-locale >= 1.0 && < 1.1, old-time >= 1.0 && < 1.2, - pandoc >= 1.12.4 && < 1.13, - pandoc-citeproc >= 0.1 && < 0.4, + pandoc >= 1.12.4 && < 1.14, + pandoc-citeproc >= 0.4 && < 0.5, parsec >= 3.0 && < 3.2, process >= 1.0 && < 1.3, random >= 1.0 && < 1.1, @@ -240,11 +240,11 @@ Test-suite hakyll-tests filepath >= 1.0 && < 1.4, lrucache >= 1.1.1 && < 1.2, mtl >= 1 && < 2.3, - network >= 2.4 && < 2.6, + network >= 2.4 && < 2.7, old-locale >= 1.0 && < 1.1, old-time >= 1.0 && < 1.2, - pandoc >= 1.12.4 && < 1.13, - pandoc-citeproc >= 0.1 && < 0.4, + pandoc >= 1.12.4 && < 1.14, + pandoc-citeproc >= 0.4 && < 0.5, parsec >= 3.0 && < 3.2, process >= 1.0 && < 1.3, random >= 1.0 && < 1.1, diff --git a/src/Hakyll/Web/Html.hs b/src/Hakyll/Web/Html.hs index a86ac1e..bed7755 100644 --- a/src/Hakyll/Web/Html.hs +++ b/src/Hakyll/Web/Html.hs @@ -36,7 +36,7 @@ import Network.URI (isUnreserved, escapeURIString) -------------------------------------------------------------------------------- -- | Map over all tags in the document withTags :: (TS.Tag String -> TS.Tag String) -> String -> String -withTags f = renderTags' . map f . TS.parseTags +withTags f = renderTags' . map f . parseTags' -------------------------------------------------------------------------------- @@ -91,6 +91,15 @@ renderTags' = TS.renderTagsOptions TS.RenderOptions -------------------------------------------------------------------------------- +-- | Customized TagSoup parser: do not decode any entities. +parseTags' :: String -> [TS.Tag String] +parseTags' = TS.parseTagsOptions (TS.parseOptions :: TS.ParseOptions String) + { TS.optEntityData = \(str, b) -> [TS.TagText $ "&" ++ str ++ [';' | b]] + , TS.optEntityAttrib = \(str, b) -> ("&" ++ str ++ [';' | b], []) + } + + +-------------------------------------------------------------------------------- -- | Convert a filepath to an URL starting from the site root -- -- Example: diff --git a/src/Hakyll/Web/Pandoc/Biblio.hs b/src/Hakyll/Web/Pandoc/Biblio.hs index db022bc..6c92f28 100644 --- a/src/Hakyll/Web/Pandoc/Biblio.hs +++ b/src/Hakyll/Web/Pandoc/Biblio.hs @@ -90,7 +90,7 @@ readPandocBiblio :: ReaderOptions -> Compiler (Item Pandoc) readPandocBiblio ropt csl biblio item = do -- Parse CSL file, if given - style <- unsafeCompiler $ CSL.readCSLFile . toFilePath . itemIdentifier $ csl + style <- unsafeCompiler $ CSL.readCSLFile Nothing . toFilePath . itemIdentifier $ csl -- We need to know the citation keys, add then *before* actually parsing the -- actual page. If we don't do this, pandoc won't even consider them diff --git a/web/examples.markdown b/web/examples.markdown index eecb2ae..0e51e8d 100644 --- a/web/examples.markdown +++ b/web/examples.markdown @@ -99,6 +99,8 @@ this list. This list has no particular ordering. [source](https://github.com/rbros/reichertbrothers.com) - <http://alemedeiros.sdf.org>, [source](https://github.com/alemedeiros/homepage) +- <http://blog.ssanj.net/>, + [source](https://github.com/ssanj/babyloncandle) - <http://ruudvanasseldonk.com/>, [source](https://github.com/ruud-v-a/ruudvanasseldonk.com) diff --git a/web/releases.markdown b/web/releases.markdown index cc704f1..376bf8a 100644 --- a/web/releases.markdown +++ b/web/releases.markdown @@ -4,6 +4,12 @@ title: Releases # Releases +## Hakyll 4.5.4.0 + +- Fix issue with HTML entities when running `withUrls` and `demoteHeaders`. +- Generate a cabal file for the initialised site. +- Add pagination support. + ## Hakyll 4.5.3.0 - Bump Pandoc to 1.12.4 to include the org-mode reader. |