mirror of
https://github.com/youwen5/blog.git
synced 2024-11-24 18:03:50 -08:00
fix: explicitly set utf-8 encoding in haskell
avoids invalid character encoding issues on some systems
This commit is contained in:
parent
dbf23c7e9b
commit
3043df6f92
1 changed files with 61 additions and 58 deletions
|
@ -5,6 +5,7 @@ import Data.List (isPrefixOf, isSuffixOf)
|
|||
import Data.Maybe (fromMaybe)
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Slugger as Slugger
|
||||
import qualified GHC.IO.Encoding as E
|
||||
import Hakyll
|
||||
import System.FilePath (takeFileName)
|
||||
import Text.Pandoc (
|
||||
|
@ -76,7 +77,9 @@ config =
|
|||
-- BUILD
|
||||
|
||||
main :: IO ()
|
||||
main = hakyllWith config $ do
|
||||
main = do
|
||||
E.setLocaleEncoding E.utf8
|
||||
hakyllWith config $ do
|
||||
forM_
|
||||
[ "CNAME"
|
||||
, "favicon.ico"
|
||||
|
|
Loading…
Reference in a new issue