Merge branch 'release/3.2.3'

This commit is contained in:
Michael Rose 2016-06-03 15:04:27 -04:00
commit a7b749650e
14 changed files with 44 additions and 22 deletions

View file

@ -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) ## [3.2.2](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.2.2)
### Enhancement ### Enhancement

View file

@ -18,9 +18,11 @@ teaser : # filename of teaser fallback teaser image placed in
# breadcrumbs : false # true, false (default) # breadcrumbs : false # true, false (default)
words_per_minute : 200 words_per_minute : 200
comments: comments:
provider : # false (default), "disqus", "facebook", "google-plus", custom" provider : # false (default), "disqus", "discourse", "facebook", "google-plus", custom"
disqus: disqus:
shortname : # https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- 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: facebook:
# https://developers.facebook.com/docs/plugins/comments # https://developers.facebook.com/docs/plugins/comments
appid : appid :

View file

@ -16,7 +16,7 @@
{% if include.type == "grid" and teaser != blank %} {% if include.type == "grid" and teaser != blank %}
<div class="archive__item-teaser"> <div class="archive__item-teaser">
<img src= <img src=
{% if teaser contains "http" %} {% if teaser contains "://" %}
"{{ teaser }}" "{{ teaser }}"
{% else %} {% else %}
"{{ teaser | prepend: "/images/" | prepend: base_path }}" "{{ teaser | prepend: "/images/" | prepend: base_path }}"

View file

@ -7,7 +7,7 @@
<div itemscope itemtype="http://schema.org/Person"> <div itemscope itemtype="http://schema.org/Person">
<div class="author__avatar"> <div class="author__avatar">
{% if author.avatar contains "http" %} {% if author.avatar contains "://" %}
<img src="{{ author.avatar }}" alt="{{ author.name }}"> <img src="{{ author.avatar }}" alt="{{ author.name }}">
{% else %} {% else %}
<img src="{{ author.avatar | prepend: "/images/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}"> <img src="{{ author.avatar | prepend: "/images/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}">

View file

@ -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 %}
<script type="text/javascript">
DiscourseEmbed = { discourseUrl: '//{{ site.comments.discourse.server }}/',
discourseEmbedUrl: '{{ canonical }}' };
(function () {
var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
})();
</script>
<noscript>Please enable JavaScript to view the comments powered by [Discourse](http://forum.beta-europe.org/c/beta/website).</a></noscript>
{% endif %}

View file

@ -19,4 +19,4 @@
}()); }());
</script> </script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{% endif %} {% endif %}

View file

@ -1,2 +1,2 @@
<script async type="text/javascript" src="//apis.google.com/js/plusone.js?callback=gpcb"></script> <script async type="text/javascript" src="//apis.google.com/js/plusone.js?callback=gpcb"></script>
<noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript> <noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript>

View file

@ -3,6 +3,8 @@
{% case site.comments.provider %} {% case site.comments.provider %}
{% when "disqus" %} {% when "disqus" %}
{% include /comments-providers/disqus.html %} {% include /comments-providers/disqus.html %}
{% when "discourse" %}
{% include /comments-providers/discourse.html %}
{% when "facebook" %} {% when "facebook" %}
{% include /comments-providers/facebook.html %} {% include /comments-providers/facebook.html %}
{% when "google-plus" %} {% when "google-plus" %}

View file

@ -10,7 +10,7 @@
{% for f in feature_row %} {% for f in feature_row %}
{% if f.url contains "http" %} {% if f.url contains "://" %}
{% capture f_url %}{{ f.url }}{% endcapture %} {% capture f_url %}{{ f.url }}{% endcapture %}
{% else %} {% else %}
{% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %} {% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %}
@ -21,7 +21,7 @@
{% if f.image_path %} {% if f.image_path %}
<div class="archive__item-teaser"> <div class="archive__item-teaser">
<img src= <img src=
{% if f.image_path contains "http" %} {% if f.image_path contains "://" %}
"{{ f.image_path }}" "{{ f.image_path }}"
{% else %} {% else %}
"{{ f.image_path | prepend: "/images/" | prepend: base_path }}" "{{ f.image_path | prepend: "/images/" | prepend: base_path }}"

View file

@ -20,7 +20,7 @@
{% for img in gallery %} {% for img in gallery %}
{% if img.url %} {% if img.url %}
<a href= <a href=
{% if img.url contains "http" %} {% if img.url contains "://" %}
"{{ img.url }}" "{{ img.url }}"
{% else %} {% else %}
"{{ img.url | prepend: "/images/" | prepend: base_path }}" "{{ img.url | prepend: "/images/" | prepend: base_path }}"
@ -28,7 +28,7 @@
{% if img.title %}title="{{ img.title }}"{% endif %} {% if img.title %}title="{{ img.title }}"{% endif %}
> >
<img src= <img src=
{% if img.image_path contains "http" %} {% if img.image_path contains "://" %}
"{{ img.image_path }}" "{{ img.image_path }}"
{% else %} {% else %}
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}" "{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
@ -37,7 +37,7 @@
</a> </a>
{% else %} {% else %}
<img src= <img src=
{% if img.image_path contains "http" %} {% if img.image_path contains "://" %}
"{{ img.image_path }}" "{{ img.image_path }}"
{% else %} {% else %}
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}" "{{ img.image_path | prepend: "/images/" | prepend: base_path }}"

View file

@ -8,7 +8,7 @@
<li> <li>
{% if nav.url %} {% if nav.url %}
{% comment %}internal/external URL check{% endcomment %} {% comment %}internal/external URL check{% endcomment %}
{% if nav.url contains "http" %} {% if nav.url contains "://" %}
{% assign domain = "" %} {% assign domain = "" %}
{% else %} {% else %}
{% assign domain = base_path %} {% assign domain = base_path %}
@ -23,7 +23,7 @@
<ul> <ul>
{% for child in nav.children %} {% for child in nav.children %}
{% comment %}internal/external URL check{% endcomment %} {% comment %}internal/external URL check{% endcomment %}
{% if child.url contains "http" %} {% if child.url contains "://" %}
{% assign domain = "" %} {% assign domain = "" %}
{% else %} {% else %}
{% assign domain = base_path %} {% assign domain = base_path %}
@ -43,6 +43,4 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>

View file

@ -1,18 +1,18 @@
{% include base_path %} {% include base_path %}
{% if page.header.image contains "http" %} {% if page.header.image contains "://" %}
{% capture img_path %}{{ page.header.image }}{% endcapture %} {% capture img_path %}{{ page.header.image }}{% endcapture %}
{% else %} {% else %}
{% capture img_path %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endcapture %} {% capture img_path %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endcapture %}
{% endif %} {% endif %}
{% if page.header.cta_url contains "http" %} {% if page.header.cta_url contains "://" %}
{% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %}
{% else %} {% else %}
{% capture cta_path %}{{ page.header.cta_url | prepend: base_path }}{% endcapture %} {% capture cta_path %}{{ page.header.cta_url | prepend: base_path }}{% endcapture %}
{% endif %} {% endif %}
{% if page.header.overlay_image contains "http" %} {% if page.header.overlay_image contains "://" %}
{% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %}
{% elsif page.header.overlay_image %} {% elsif page.header.overlay_image %}
{% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endcapture %} {% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endcapture %}
@ -52,4 +52,4 @@
{% if page.header.caption %} {% if page.header.caption %}
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span> <span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
{% endif %} {% endif %}
</div> </div>

View file

@ -60,7 +60,7 @@
{% if page.header.image %} {% if page.header.image %}
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{% if page.header.image contains "http" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}"> <meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% else %} {% else %}
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
{% if site.og_image %} {% if site.og_image %}
@ -84,7 +84,7 @@
{% endif %} {% endif %}
{% if page.header.image %} {% if page.header.image %}
<meta property="og:image" content="{% if page.header.image contains "http" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}"> <meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% endif %} {% endif %}
{% if page.date %} {% if page.date %}

View file

@ -7,7 +7,7 @@
{% for s in page.sidebar %} {% for s in page.sidebar %}
{% if s.image %} {% if s.image %}
<img src= <img src=
{% if s.image contains "http" %} {% if s.image contains "://" %}
"{{ s.image }}" "{{ s.image }}"
{% else %} {% else %}
"{{ s.image | prepend: "/images/" | prepend: base_path }}" "{{ s.image | prepend: "/images/" | prepend: base_path }}"