From 660b7aae4264fb7641b27c93adc12ed7da966702 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 11 Apr 2020 15:08:57 -0700 Subject: Fix fonts: remove --self-contained from pandoc With --self-contained pandoc will embed the entire font in the HTML, which is just too much. Instead let's link it, but we have to tread the style.css as an HTML file in order to do so. --- Run/Que/Website.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Run/Que/Website.hs') diff --git a/Run/Que/Website.hs b/Run/Que/Website.hs index 23e3740..9d96628 100644 --- a/Run/Que/Website.hs +++ b/Run/Que/Website.hs @@ -45,6 +45,7 @@ main = do , style = src "style.css" , apidocs = src "apidocs.md" , tutorial = src "tutorial.md" + , fontLink = src "font.html" } getKey :: Namespace -> IO (Maybe Key) @@ -70,6 +71,7 @@ data Sources = Sources , style :: FilePath , tutorial :: FilePath , apidocs :: FilePath + , fontLink :: FilePath } type Namespace = Text @@ -95,8 +97,9 @@ run key ns Sources {..} = Async.runConcurrently actions >> return () BS.pack <$> Process.readProcess "pandoc" - [ "--self-contained" - , "--css" + [ "--include-in-header" + , fontLink + , "--include-in-header" , style , "-i" , md -- cgit v1.2.3