Update Google+ page comments for /docs

This commit is contained in:
Michael Rose 2017-07-05 12:07:27 -04:00
parent 8e51d4b8f1
commit 94dcda2d89
2 changed files with 104 additions and 94 deletions

View file

@ -1,18 +1,16 @@
{% if site.comments.provider and page.comments %}
{% case site.comments.provider %}
{% when "disqus" %}
{% case site.comments.provider %}
{% when "disqus" %}
{% include /comments-providers/disqus.html %}
{% when "discourse" %}
{% when "discourse" %}
{% include /comments-providers/discourse.html %}
{% when "facebook" %}
{% when "facebook" %}
{% include /comments-providers/facebook.html %}
{% when "google-plus" %}
{% when "google-plus" %}
{% include /comments-providers/google-plus.html %}
{% when "staticman" %}
{% when "staticman" %}
{% include /comments-providers/staticman.html %}
{% when "custom" %}
{% when "custom" %}
{% include /comments-providers/custom.html %}
{% endcase %}
{% endcase %}
{% endif %}

View file

@ -12,7 +12,19 @@
<section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
{% when "google-plus" %}
<h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="g-comments" data-href="{{ page.url | absolute_url }}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</section>
<section id="g-comments" class="g-comments">Loading Google+ Comments ...</section>
<script>
function initComment() {
gapi.comments.render("g-comments", {
href: "{{ page.url | absolute_url }}",
width: "624",
first_party_property: "BLOGGER",
view_type: "FILTERED_POSTMOD"
})
}
</script>
<script async type="text/javascript" src="https://apis.google.com/js/plusone.js" onload="initComment()" />
<noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript>-->
{% when "staticman" %}
<section id="static-comments">
{% if site.repository and site.staticman.branch %}