diff options
Diffstat (limited to '_includes/functions')
-rw-r--r-- | _includes/functions/get_datetimes.html | 4 | ||||
-rw-r--r-- | _includes/functions/get_reading_time.html | 8 | ||||
-rw-r--r-- | _includes/functions/get_value.html | 20 | ||||
-rw-r--r-- | _includes/functions/log.html | 8 |
4 files changed, 20 insertions, 20 deletions
diff --git a/_includes/functions/get_datetimes.html b/_includes/functions/get_datetimes.html index 4398fbf..f5b4d7e 100644 --- a/_includes/functions/get_datetimes.html +++ b/_includes/functions/get_datetimes.html @@ -1,5 +1,5 @@ -{% if include.filter %} - {% assign filter = include.filter %} +{% if include.params.filter %} + {% assign filter = include.params.filter %} {% endif %} {% assign split_mark = '<|>' %} diff --git a/_includes/functions/get_reading_time.html b/_includes/functions/get_reading_time.html index d28b69c..7747108 100644 --- a/_includes/functions/get_reading_time.html +++ b/_includes/functions/get_reading_time.html @@ -1,9 +1,9 @@ -{% if include.article %} - {% assign article = include.article %} +{% if include.params.article %} + {% assign article = include.params.article %} {% endif %} -{% if include.speed %} - {% assign speed = include.speed %} +{% if include.params.speed %} + {% assign speed = include.params.speed %} {% else %} {% assign speed = 160 %} {% endif %} diff --git a/_includes/functions/get_value.html b/_includes/functions/get_value.html index 17561a2..5b1dbc4 100644 --- a/_includes/functions/get_value.html +++ b/_includes/functions/get_value.html @@ -1,19 +1,19 @@ -{%- if include.name -%} - {%- assign name = include.name -%} +{%- if include.params.name -%} + {%- assign name = include.params.name -%} {%- endif -%} -{%- assign return = include.return -%} - -{%- if page[name] -%} +{%- if page[name] != nil -%} {%- assign return = page[name] -%} -{%- elsif site[name] -%} +{%- elsif site[name] != nil -%} {%- assign return = site[name] -%} -{%- elsif site.data[name] -%} +{%- elsif site.data[name] != nil -%} {%- assign return = site.data[name] -%} -{%- elsif site.defaults[page.layout][name] -%} +{%- elsif site.defaults[page.layout][name] != nil -%} {%- assign return = site.defaults[page.layout][name] -%} -{%- elsif site.data.defaults[page.layout][name] -%} +{%- elsif site.data.defaults[page.layout][name] != nil -%} {%- assign return = site.data.defaults[page.layout][name] -%} -{%- elsif layout[name] -%} +{%- elsif layout[name] != nil -%} {%- assign return = layout[name] -%} +{%- else -%} + {%- assign return = include.params.default -%} {%- endif -%} diff --git a/_includes/functions/log.html b/_includes/functions/log.html index b2a6130..95d1856 100644 --- a/_includes/functions/log.html +++ b/_includes/functions/log.html @@ -1,9 +1,9 @@ -{% if include.level %} - {% assign level = include.level %} +{% if include.params.level %} + {% assign level = include.params.level %} {% endif %} -{% if include.msg %} - {% assign msg = include.msg %} +{% if include.params.msg %} + {% assign msg = include.params.msg %} {% endif %} {% if site.debug == true %} |