【发布时间】:2016-04-16 06:43:39
【问题描述】:
我正在使用Hakyll 生成我的博客,并希望在生成的网站中集成一些我提供的演讲幻灯片。这应该像定义您自己的自定义 pandocCompiler 并具有足够的配置一样简单,而且我确实设法做到了。
这里是编译器定义:
pandocSlideCompiler :: Compiler (Item String)
pandocSlideCompiler = pandocCompilerWith defaultHakyllReaderOptions writeHtmlSlide
where
writeHtmlSlide = defaultHakyllWriterOptions { writerIncremental = True
, writerSectionDivs = False
, writerVariables = [("theme", "beige")]
, writerSlideLevel = Just 2
, writerSlideVariant = RevealJsSlides
, writerIgnoreNotes = True
}
这可行,但生成的幻灯片格式不正确:每张幻灯片都生成为div,而reveal.js 需要section。
这是我想要实现的命令行等效项:
pandoc --slide-level 2 --variable theme=beige -i -s -o slides.html --template=template-revealjs.html -t revealjs slides.md
那么我的问题是:我应该使用Text.Pandoc.Options 中的哪些选项来产生与命令行相同的结果?
【问题讨论】:
标签: haskell pandoc reveal.js hakyll