如何在我的Gollum Wiki上添加Disqus评论? [英] How can I add Disqus commenting to my Gollum wiki?
问题描述
我想将我的Gollum Wiki(使用aws& github)用于一个图书项目.我想给每个章节一个单独的页面,并让一群朋友(和任何人)发表评论.我期望那里已经有十几种如何为此页面.但是我什么也找不到.我意识到这通常意味着我想做的事是个坏主意,或者可以通过其他方式更轻松地实现.
I would like to use my Gollum Wiki (using aws & github) for a book project. I want to give each chapter its own page and let a circle of friends (and anyone) leave comments. I was expecting there to be a dozen how to pages for this already out there. But I can't find anything. I realize this usually means what I'm trying to do is a bad idea or can more easily be accomplished some other way.
推荐答案
我添加Disqus评论的方法是简单地添加一个包含Disqus嵌入代码的胡须局部模板({{>comments}}
),然后修改库存
The way I added Disqus comments was to simply add a mustache partial template ({{>comments}}
) that contains the Disqus embed code, and then modified the stock page.template
to reference it.
最后,我将所有股票模板以及新的comments.mustache
复制并修改了page.mustache
到我选择的位置,然后通过template-dir
选项将Gollum指向它.
Finally, I copied all stock templates plus the new comments.mustache
and modified page.mustache
ones to a location of my choice and pointed Gollum to it via the template-dir
option.
另请参见 Gollum的问题#1222 和
See also Gollum's issue #1222 and the Gollum installation guide I wrote for more details.
这篇关于如何在我的Gollum Wiki上添加Disqus评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!