如何将 PNG 图像嵌入堆栈(小胡子)模板中?
How can I embed a PNG image in a stack (mustache) template?
我的具体问题是我想创建一个 stack template to replace the hakyll-init
executable that is included in the hakyll 包。
有问题的文件是 haskell-logo.png。我该如何编码这个文件,以便在我 运行 stack new my-project my-template.hsfiles
时重新创建它?
您可以指定 base64 作为内容编码,如 this。
{-# START_FILE BASE64 static/fonts/glyphicons-halflings-regular.eot #-}
b08AABFOAAACAAIABAAAAAAABQAAAAAAAAABAJABAAAEAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAA
此 stack's dependency 提供了该功能,但没有直接记录。
我的具体问题是我想创建一个 stack template to replace the hakyll-init
executable that is included in the hakyll 包。
有问题的文件是 haskell-logo.png。我该如何编码这个文件,以便在我 运行 stack new my-project my-template.hsfiles
时重新创建它?
您可以指定 base64 作为内容编码,如 this。
{-# START_FILE BASE64 static/fonts/glyphicons-halflings-regular.eot #-}
b08AABFOAAACAAIABAAAAAAABQAAAAAAAAABAJABAAAEAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAA
此 stack's dependency 提供了该功能,但没有直接记录。