From 61eae5c5f9881cab29712f6e696085baa977e1f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Wed, 11 Sep 2019 12:19:34 +0800 Subject: release: v1.0.0 --- _includes/functions/get_value.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 _includes/functions/get_value.html (limited to '_includes/functions/get_value.html') diff --git a/_includes/functions/get_value.html b/_includes/functions/get_value.html new file mode 100644 index 0000000..2d90b19 --- /dev/null +++ b/_includes/functions/get_value.html @@ -0,0 +1,17 @@ +{%- if include.name -%} + {%- assign name = include.name -%} +{%- endif -%} + +{%- assign return = include.return -%} + +{%- if page[name] -%} + {%- assign return = page[name] -%} +{%- elsif site.data[name] -%} + {%- assign return = site.data[name] -%} +{%- elsif site.defaults[page.layout][name] -%} + {%- assign return = site.defaults[page.layout][name] -%} +{%- elsif site.data.defaults[page.layout][name] -%} + {%- assign return = site.data.defaults[page.layout][name] -%} +{%- elsif layout[name] -%} + {%- assign return = layout[name] -%} +{%- endif -%} -- cgit v1.2.3