hakyll

    6热度

    1回答

    我看到创建函数需要一个标识符列表。 ghci λ> :t create create :: [Identifier] -> Rules() -> Rules() 我应该使用什么样的标识符列表来匹配网站的根?例如,我只想制作一个不带“/ posts”或“/ archives”或任何其他域部分的“www.example.com”上出现的单个html页面。 我试过几个: create "/" $

    2热度

    1回答

    我想第一次使用Hakyll。遵循关于the official site的教程,我试图扩展路径处理图像以使用字体。我已经改变了代码site.hs这样: match ("images/*" .||. "fonts/*") $ do route idRoute compile copyFileCompiler 在fonts目录,我有一些.ttf字体文件,其权限和业主配合网站的静态

    0热度

    1回答

    我正在关注the official instructions on the Hakyll site,以便在我的网站上启动并运行帖子挑逗。不幸的是,我碰到了一个障碍,并且说明没有太大的帮助。 我得到超出范围的错误在这个片段中引用的item值: loadAndApplyTemplate "template/postitem.html" (teaserField "teaser" "

    0热度

    1回答

    在杰基尔有可能会有类似 --- title: Whatever layout: null --- <h1>{{ title }}</h1> 的{{ title }}将被插的文件,但layout: null意味着该文件的内容将不会被包裹在任何类型的模板。 Hakyll有什么等价物?换句话说,如果我有一个自包含的文件中像 <h1>$title$</h1> 什么样块的,我需要传递给co

    -3热度

    1回答

    我正在尝试构建this Hakyll blog。在尝试编译site.hs,网站建设方案... [email protected]:/usr/local# git clone https://github.com/relrod/blog elrod.me [email protected]:/usr/local# cd elrod.me [email protected]:/usr/local/

    1热度

    1回答

    我可以编译Hakyll,但是当我尝试运行它时,出现链接错误。 首先,我在沙箱中安装Hakyll: cabal sandbox init cabal install Hakyll 这成功完成。 然后我用hakyll-init创建一个普通的网站和移动文件了目录: .cabal-sandbox/bin/hakyll-init mysite mv mysite/* . rm -rf mysite

    0热度

    2回答

    我想为我的Hakyll站点的上下文添加一个字段。如果某个关键字存在于元数据中,那么我想转换相应的值并将其包含在上下文中。如果密钥不存在于元数据中,则不应将任何内容添加到上下文中。 我写了这个功能应该做什么,我描述: -- | Creates a new field based on the item's metadata. If the metadata field is -- not pres

    1热度

    1回答

    我想写一个特殊的Hakyll编译器来使用lua脚本来构建我的网站。我发现这个功能,接缝,使我想: customWriterCompilerWith :: (WriterOptions -> Pandoc -> IO String) -> ReaderOptions -> WriterOptions -> Compiler (Item String) cus

    1热度

    1回答

    我试图在Hakyll中自动生成参考书目。我正在使用nocite pandoc功能来生成.bib文件中所有发布的列表。但是,我想有不同的部分(即同行评审,论文,海报等) 我如何做到这一点的想法是让像下面这样的模板: --- title: $title$ --- **Section: $title** --- nocite: | @* --- 然后,我会做到以下几点: 使用p

    0热度

    1回答

    我想匹配posts目录中扩展名为*.md和*.tex的文件。 我不能使用"posts/*" :: Pattern的原因是因为帖子目录中有文件*.tex.metadata。而site会给这个文件带来错误。 [ERROR] Hakyll.Web.readPandocWith: I don't know how to read a file of the type Binary for: posts/2