-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.html
34 lines (28 loc) · 1.16 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
layout: compress
---
{% assign author = site.data.authors[page.author] | default:site.data.authors.first[1] | default:site.author %}
{% assign image = site.image %}
{% assign color = site.color | default:'#4f86aa' %}
{% if page.categories.size > 0 %}
{% assign category_name = page.categories.first %}
{% assign category = site.featured_categories | where: "slug", category_name | first %}
{% if category.color %}{% assign color = category.color %}{% endif %}
{% if category.image %}{% assign image = category.image %}{% endif %}
{% elsif page.tags.size > 0 %}
{% assign tag_name = page.tags.first %}
{% assign tag = site.featured_tags | where: "slug", tag_name | first %}
{% if tag.color %}{% assign color = tag.color %}{% endif %}
{% if tag.image %}{% assign image = tag.image %}{% endif %}
{% elsif author %}
{% if author.color %}{% assign color = author.color %}{% endif %}
{% if author.image %}{% assign image = author.image %}{% endif %}
{% endif %}
{% if page.color %}{% assign color = page.color %}{% endif %}
{% if page.image %}{% assign image = page.image %}{% endif %}
<head>
{% include head.html %}
</head>
<body>
{% include body.html %}
</body>