From f304f30d95af9f9f115f4813d41824c934e15747 Mon Sep 17 00:00:00 2001 From: Kang Cheng Date: Thu, 23 Aug 2018 22:51:26 +0100 Subject: [PATCH] feat: add wildfire comment plug-in support --- _config.yml | 26 +++++++++++ _includes/_macro/post.html | 10 +++++ _includes/_partials/comments.html | 2 + _includes/_third-party/comments/index.html | 1 + _includes/_third-party/comments/wildfire.html | 44 +++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 _includes/_third-party/comments/wildfire.html diff --git a/_config.yml b/_config.yml index 6f99140c74..6f631d740a 100644 --- a/_config.yml +++ b/_config.yml @@ -387,6 +387,32 @@ disqus: # count need to be false when hide is true hide: false +# +wildfire: + enable: false + # version - It's recommended to use the following versions. + loaderVersion: 1.2.5 # https://www.npmjs.com/package/wildfire-comment + useDev: true + version: 0.5.6 + # database config + databaseProvider: firebase # or wilddog + firebase: # your firebase config goes here ↓ + apiKey: + authDomain: + databaseURL: + projectId: + storageBucket: + messagingSenderId: + wilddog: # your wilddog config goes here ↓ + siteId: + # other configs + theme: light # or dark + locale: en # or other locales, e.g. zh-CN + defaultAvatarURL: +# Any question? +# Raise an issue here: https://github.com/cheng-kang/wildfire/issues +# + # Hypercomments #hypercomments_id: diff --git a/_includes/_macro/post.html b/_includes/_macro/post.html index b63a1267aa..0036aabf0d 100644 --- a/_includes/_macro/post.html +++ b/_includes/_macro/post.html @@ -146,6 +146,16 @@ data-disqus-identifier="{{ post.url }}" itemprop="commentCount"> + {% elsif site.wildfire.enable %} + + + + + + + {% elsif site.hypercomments_id %} diff --git a/_includes/_partials/comments.html b/_includes/_partials/comments.html index 8233373b76..939ff0f210 100644 --- a/_includes/_partials/comments.html +++ b/_includes/_partials/comments.html @@ -32,6 +32,8 @@
{% elsif site.changyan.appid and site.changyan.appkey %}
+ {% elsif site.wildfire.enable %} +
{% endif %} {% endif %} diff --git a/_includes/_third-party/comments/index.html b/_includes/_third-party/comments/index.html index 523c45e498..6e20bf36e6 100644 --- a/_includes/_third-party/comments/index.html +++ b/_includes/_third-party/comments/index.html @@ -6,3 +6,4 @@ {% include _third-party/comments/youyan.html %} {% include _third-party/comments/livere.html %} {% include _third-party/comments/changyan.html %} +{% include _third-party/comments/wildfire.html %} diff --git a/_includes/_third-party/comments/wildfire.html b/_includes/_third-party/comments/wildfire.html new file mode 100644 index 0000000000..7b07d39b0e --- /dev/null +++ b/_includes/_third-party/comments/wildfire.html @@ -0,0 +1,44 @@ +{% if site.wildfire.enable %} + + {% if page.comments %} + {% if site.wildfire.loaderVersion %} + + {% else %} + + {% endif %} + {% endif %} + +{% endif %}