diff options
author | jeffreytse <jeffreytse.mail@gmail.com> | 2020-09-29 12:54:54 +0800 |
---|---|---|
committer | jeffreytse <jeffreytse.mail@gmail.com> | 2020-09-29 12:54:54 +0800 |
commit | a7d8a2977d6110d1f8778b8ae02067982a5e43a7 (patch) | |
tree | 6f4f0fa9332ce325c99d8b769814408a7888d760 /_includes/functions/get_value.html | |
parent | 0e8b292bd00ffa4bef4d8aeb436696a7d218243a (diff) |
fix: some function params not working
Diffstat (limited to '_includes/functions/get_value.html')
-rw-r--r-- | _includes/functions/get_value.html | 20 |
1 files changed, 10 insertions, 10 deletions
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 -%} |