Merge branch 'hotfix/3.2.6'

This commit is contained in:
Michael Rose 2016-06-07 11:34:45 -04:00
commit 5615f4c67f
4 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,9 @@
## [3.2.6](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.2.6)
### Bug Fixes
- Fix error `Liquid Exception: divided by 0 in _includes/archive-single.html, included in _layouts/single.html` caused by null `words_per_minute` in `_config.yml`. [#345](https://github.com/mmistakes/minimal-mistakes/pull/345)
## [3.2.5](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.2.5)
### Bug Fixes

View file

@ -27,6 +27,7 @@ en: &DEFAULT_EN
website_label : "Website"
email_label : "Email"
recent_posts : "Recent Posts"
undefined_wpm : "Undefined parameter words_per_minute at _config.yml"
en-US:
<<: *DEFAULT_EN
en-UK:
@ -59,6 +60,7 @@ es: &DEFAULT_ES
website_label : "Sitio web"
email_label : "Email"
recent_posts : "Entradas recientes"
undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml"
es-ES:
<<: *DEFAULT_ES
es-CO:

View file

@ -4,10 +4,14 @@
{% assign words = page.content | strip_html | number_of_words %}
{% endif %}
{% if words < 180 %}
{{ site.data.ui-text[site.locale].less_than }} 1 {{ site.data.ui-text[site.locale].minute_read }}
{% elsif words < 360 %}
1 {{ site.data.ui-text[site.locale].minute_read }}
{% if site.words_per_minute %}
{% if words < 180 %}
{{ site.data.ui-text[site.locale].less_than }} 1 {{ site.data.ui-text[site.locale].minute_read }}
{% elsif words < 360 %}
1 {{ site.data.ui-text[site.locale].minute_read }}
{% else %}
{{ words | divided_by:site.words_per_minute }} {{ site.data.ui-text[site.locale].minutes_read }}
{% endif %}
{% else %}
{{ words | divided_by:site.words_per_minute }} {{ site.data.ui-text[site.locale].minutes_read }}
{{ site.data.ui-text[site.locale].undefined_wpm }}
{% endif %}

View file

@ -1,6 +1,6 @@
{
"name": "minimal-mistakes",
"version": "3.2.5",
"version": "3.2.6",
"description": "Minimal Mistakes Jekyll theme npm build scripts",
"repository": {
"type": "git",