diff --git a/CHANGELOG.md b/CHANGELOG.md index da4c4aff..169eb0ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [3.2.3](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.2.3) + +### Enhancement + +- Add [Discourse](https://www.discourse.org/) as a commenting provider [#335](https://github.com/mmistakes/minimal-mistakes/pull/335) + ## [3.2.2](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.2.2) ### Enhancement diff --git a/_config.yml b/_config.yml index d3932ea6..01346491 100644 --- a/_config.yml +++ b/_config.yml @@ -18,9 +18,11 @@ teaser : # filename of teaser fallback teaser image placed in # breadcrumbs : false # true, false (default) words_per_minute : 200 comments: - provider : # false (default), "disqus", "facebook", "google-plus", custom" + provider : # false (default), "disqus", "discourse", "facebook", "google-plus", custom" disqus: shortname : # https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- + discourse: + server : # https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963 , e.g.: meta.discourse.org facebook: # https://developers.facebook.com/docs/plugins/comments appid : diff --git a/_includes/archive-single.html b/_includes/archive-single.html index 60b63f91..a3f5272e 100644 --- a/_includes/archive-single.html +++ b/_includes/archive-single.html @@ -16,7 +16,7 @@ {% if include.type == "grid" and teaser != blank %}
- {% if author.avatar contains "http" %} + {% if author.avatar contains "://" %} {{ author.name }} {% else %} {{ author.name }} diff --git a/_includes/comments-providers/discourse.html b/_includes/comments-providers/discourse.html new file mode 100644 index 00000000..1d23b6f2 --- /dev/null +++ b/_includes/comments-providers/discourse.html @@ -0,0 +1,14 @@ +{% if site.comments.discourse.server %} +{% include base_path %} +{% capture canonical %}{{ base_path }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + + +{% endif %} \ No newline at end of file diff --git a/_includes/comments-providers/disqus.html b/_includes/comments-providers/disqus.html index b80be9ef..c6fc691d 100644 --- a/_includes/comments-providers/disqus.html +++ b/_includes/comments-providers/disqus.html @@ -19,4 +19,4 @@ }()); -{% endif %} +{% endif %} \ No newline at end of file diff --git a/_includes/comments-providers/google-plus.html b/_includes/comments-providers/google-plus.html index cd582c3d..0b4ff6b7 100644 --- a/_includes/comments-providers/google-plus.html +++ b/_includes/comments-providers/google-plus.html @@ -1,2 +1,2 @@ - + \ No newline at end of file diff --git a/_includes/comments-providers/scripts.html b/_includes/comments-providers/scripts.html index df699fc5..0da90c5d 100644 --- a/_includes/comments-providers/scripts.html +++ b/_includes/comments-providers/scripts.html @@ -3,6 +3,8 @@ {% case site.comments.provider %} {% when "disqus" %} {% include /comments-providers/disqus.html %} +{% when "discourse" %} + {% include /comments-providers/discourse.html %} {% when "facebook" %} {% include /comments-providers/facebook.html %} {% when "google-plus" %} diff --git a/_includes/feature_row b/_includes/feature_row index 798ac44e..10592b7e 100644 --- a/_includes/feature_row +++ b/_includes/feature_row @@ -10,7 +10,7 @@ {% for f in feature_row %} - {% if f.url contains "http" %} + {% if f.url contains "://" %} {% capture f_url %}{{ f.url }}{% endcapture %} {% else %} {% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %} @@ -21,7 +21,7 @@ {% if f.image_path %}
{% else %} {% if nav.url %} {% comment %}internal/external URL check{% endcomment %} - {% if nav.url contains "http" %} + {% if nav.url contains "://" %} {% assign domain = "" %} {% else %} {% assign domain = base_path %} @@ -23,7 +23,7 @@
    {% for child in nav.children %} {% comment %}internal/external URL check{% endcomment %} - {% if child.url contains "http" %} + {% if child.url contains "://" %} {% assign domain = "" %} {% else %} {% assign domain = base_path %} @@ -43,6 +43,4 @@ {% endfor %}
- - - + \ No newline at end of file diff --git a/_includes/page__hero.html b/_includes/page__hero.html index bdbf130b..6cc1ee7e 100644 --- a/_includes/page__hero.html +++ b/_includes/page__hero.html @@ -1,18 +1,18 @@ {% include base_path %} -{% if page.header.image contains "http" %} +{% if page.header.image contains "://" %} {% capture img_path %}{{ page.header.image }}{% endcapture %} {% else %} {% capture img_path %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endcapture %} {% endif %} -{% if page.header.cta_url contains "http" %} +{% if page.header.cta_url contains "://" %} {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} {% else %} {% capture cta_path %}{{ page.header.cta_url | prepend: base_path }}{% endcapture %} {% endif %} -{% if page.header.overlay_image contains "http" %} +{% if page.header.overlay_image contains "://" %} {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} {% elsif page.header.overlay_image %} {% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endcapture %} @@ -52,4 +52,4 @@ {% if page.header.caption %} {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
{% endif %} -
+
\ No newline at end of file diff --git a/_includes/seo.html b/_includes/seo.html index f914ce36..8073725a 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -60,7 +60,7 @@ {% if page.header.image %} - + {% else %} {% if site.og_image %} @@ -84,7 +84,7 @@ {% endif %} {% if page.header.image %} - + {% endif %} {% if page.date %} diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 445dd207..b8ee39ab 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -7,7 +7,7 @@ {% for s in page.sidebar %} {% if s.image %}