我应该如何将 pandoc 与我的 OpenShift 应用程序捆绑在一起?

How should I bundle pandoc with my OpenShift application?

我已经 运行 使用 https://github.com/openshift-quickstart/jekyll-openshift 在 OpenShift 上使用 jekyll。我希望能够自动重建我的网站以便发布未来日期的帖子,而不必 rebuild/reupload 才能发布它们。这意味着我在 OpenShift 上有一个 cron 作业 运行 重建我的 jekyll 站点,从我正在使用的 OpenShift 卡带中调整 deploy bash 脚本。到目前为止,还不错。

现在我想用 pandoc 代替 kramdown。现在我有一个问题。如何安装 pandoc 作为我的应用程序部署到 OpenShift 的一部分?

我在网上搜索了一个小时左右。我收到相互矛盾的报告。使用人偶。从源代码构建,以 "Install the Haskell platform" 开头。我不介意这项工作,但我想知道在完成所有工作并撕掉我的头发之前该走哪条路。

那么...您会选择哪条路径以及我可以阅读哪些文章来指导我学习我需要学习的内容才能做到这一点?

谢谢。

Pandoc 是用 Haskell 编写的,因此您必须使用 cabalstack 来构建它。但是,一旦构建完成,您就可以将二进制文件移动到您的服务器:

来自Installing Pandoc

It is possible to compile pandoc such that the data files pandoc uses are embedded in the binary. (The executables in the binary are built this way.) The resulting binary can be run from any directory and is completely self-contained.

cabal update
cabal install hsb2hs
cabal install --flags="embed_data_files" pandoc pandoc-citeproc