2020-09-29 06:54:54 +02:00
|
|
|
{%- if include.params.name -%}
|
|
|
|
{%- assign name = include.params.name -%}
|
2019-09-11 06:19:34 +02:00
|
|
|
{%- endif -%}
|
|
|
|
|
2021-06-25 08:13:00 +02:00
|
|
|
{%- assign return = nil -%}
|
|
|
|
|
2021-06-17 12:57:37 +02:00
|
|
|
{%- assign keys = name | split:'.' -%}
|
2021-01-08 04:51:40 +01:00
|
|
|
{%- assign name = keys.first -%}
|
2021-06-25 08:13:00 +02:00
|
|
|
{%- assign keys = keys | shift -%}
|
2021-01-08 04:51:40 +01:00
|
|
|
|
2021-06-25 08:13:00 +02:00
|
|
|
{%- for step in (1..7) -%}
|
2021-01-08 04:51:40 +01:00
|
|
|
|
2021-06-25 08:13:00 +02:00
|
|
|
{%- case step -%}
|
|
|
|
{%- when 1 -%}
|
|
|
|
{%- assign return = page[name] -%}
|
|
|
|
{%- when 2 -%}
|
|
|
|
{%- assign return = site[name] -%}
|
|
|
|
{%- when 3 -%}
|
|
|
|
{%- assign return = site.data[name] -%}
|
|
|
|
{%- when 4 -%}
|
|
|
|
{%- assign return = site.defaults[page.layout][name] -%}
|
|
|
|
{%- when 5 -%}
|
|
|
|
{%- assign return = site.data.defaults[page.layout][name] -%}
|
|
|
|
{%- when 6 -%}
|
|
|
|
{%- assign return = layout[name] -%}
|
|
|
|
{%- else -%}
|
|
|
|
{%- assign return = include.params.default -%}
|
|
|
|
{%- endcase -%}
|
|
|
|
|
|
|
|
{%- for key in keys -%}
|
|
|
|
{%- assign return = return[key] -%}
|
|
|
|
{%- if return == nil -%}
|
|
|
|
{%- break -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
|
|
|
|
{%- if return != nil -%}
|
2021-01-08 04:51:40 +01:00
|
|
|
{%- break -%}
|
|
|
|
{%- endif -%}
|
2021-06-25 08:13:00 +02:00
|
|
|
|
2021-01-08 04:51:40 +01:00
|
|
|
{%- endfor -%}
|
|
|
|
|