blog/_layouts/framework.html
2019-09-20 17:41:48 +08:00

35 lines
830 B
HTML

---
layout: default
---
<div class="framework">
<section class="main">
{{ content }}
</section>
<section class="sidebar" style="margin-left: 15px;">
<!-- Get sidebar items -->
{%- if page.sidebar -%}
{%- assign sidebar = page.sidebar -%}
{%- elsif site.defaults[page.layout].sidebar -%}
{%- assign sidebar = site.defaults[page.layout].sidebar -%}
{%- elsif layout.sidebar -%}
{%- assign sidebar = layout.sidebar -%}
{%- endif -%}
{%- for item in sidebar -%}
{%- assign file = item -%}
{%- assign array = file | split: '.' -%}
{%- if array.size == 1 -%}
{%- assign file = file | append: '.html' -%}
{%- endif -%}
{%- assign file = 'sidebar/' | append: file -%}
{%- include {{ file }} %}
{%- endfor -%}
</section>
</div>