--- title: 为Hexo博客Next主题添加Wildfire评论系统 date: 2017-12-26 14:18:11 tags: [vps, hexo] categories: vps --- 本文主要记录[Wildfire](https://github.com/cheng-kang/wildfire)评论系统搭建的过程。 ## Hexo配置步骤 {% note primary %} Step 1 {% endnote %} 关于wildfire的设置,请直接参考{% link 官方帮助文档 https://wildfire.js.org/#/zh-cn/usage?id=%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e %}。 {% note primary %} Step 2 {% endnote %} 在`%BLOG_PATH%\themes\next\layout\_third-party\comments`路径下创建`wildfire.swig`文件 ```swig {% if page.comments and theme.wildfire.enable %} {% endif %} ``` {% note primary %} Step 3 {% endnote %} 在{% quote %}%BLOG_PATH%\themes\next\layout\_third-party\comments\index.swig{% endquote %}文件中添加wildfire.swig的引用: {% code lang:swig %} {% raw %}{% include 'wildfire.swig' %}{% endraw %} {% endcode%} {% note primary %} Step 4 {% endnote %} 在`%BLOG_PATH%\themes\next\layout\_partials\comments.swig`文件中,添加一个elseif代码块: ```swig {% elseif theme.wildfire.enable %}