summaryrefslogtreecommitdiff
path: root/_includes/functions/get_value.html
blob: 17561a2cdea82679e8f73d355b6df79b1b9eba6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{%- if include.name -%}
  {%- assign name = include.name -%}
{%- endif -%}

{%- assign return = include.return -%}

{%- if page[name] -%}
  {%- assign return = page[name] -%}
{%- elsif site[name] -%}
  {%- assign return = site[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 -%}