mirror of
https://github.com/youwen5/blog.git
synced 2024-11-28 11:23:49 -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 Data.Maybe (fromMaybe)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Data.Text.Slugger as Slugger
|
import qualified Data.Text.Slugger as Slugger
|
||||||
|
import qualified GHC.IO.Encoding as E
|
||||||
import Hakyll
|
import Hakyll
|
||||||
import System.FilePath (takeFileName)
|
import System.FilePath (takeFileName)
|
||||||
import Text.Pandoc (
|
import Text.Pandoc (
|
||||||
|
@ -76,7 +77,9 @@ config =
|
||||||
-- BUILD
|
-- BUILD
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = hakyllWith config $ do
|
main = do
|
||||||
|
E.setLocaleEncoding E.utf8
|
||||||
|
hakyllWith config $ do
|
||||||
forM_
|
forM_
|
||||||
[ "CNAME"
|
[ "CNAME"
|
||||||
, "favicon.ico"
|
, "favicon.ico"
|
||||||
|
|
Loading…
Reference in a new issue