Add default values for config variables (#621)
This commit is contained in:
parent
4a708530d9
commit
b03fb7311f
@ -1,7 +1,9 @@
|
||||
<footer class="footer-min">
|
||||
<div class="text-muted">
|
||||
{% if site.author.name %}
|
||||
{{ site.author.name }}
|
||||
•
|
||||
{% endif %}
|
||||
{% if page.date %}
|
||||
{{ page.date }}
|
||||
{% else %}
|
||||
|
@ -25,8 +25,10 @@
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
<p class="copyright text-muted">
|
||||
{% if site.author.name %}
|
||||
{{ site.author.name }}
|
||||
•
|
||||
{% endif %}
|
||||
{{ site.time | date: '%Y' }}
|
||||
|
||||
{% if site.url-pretty %}
|
||||
|
@ -3,15 +3,17 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
|
||||
|
||||
<title>{% if page.use-site-title %}{{ site.title }} {{ site.title-separator }} {{ site.description }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||
<title>{% if page.use-site-title %}{{ site.title }} {{ site.title-separator | default: '-' }} {{ site.description }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||
|
||||
{% if site.author.name %}
|
||||
<meta name="author" content="{{ site.author.name }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if page.subtitle %}
|
||||
<meta name="description" content="{{ page.subtitle }}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} {{ site.title-separator }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title | default: 'Untitled' }} {{ site.title-separator | default: '-' }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}" />
|
||||
|
||||
{% include gtag.html %}
|
||||
{% include gtm_head.html %}
|
||||
@ -62,7 +64,7 @@
|
||||
<meta property="og:title" content="{{ page.meta-title }}" />
|
||||
{% elsif page.title %}
|
||||
<meta property="og:title" content="{{ page.title }}" />
|
||||
{% else %}
|
||||
{% elsif site.title %}
|
||||
<meta property="og:title" content="{{ site.title }}" />
|
||||
{% endif %}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<!-- TODO this file has become a mess, refactor it -->
|
||||
|
||||
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
|
||||
|
||||
{% if page.bigimg or page.title %}
|
||||
|
||||
{% if page.bigimg %}
|
||||
@ -36,7 +38,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if include.type == "post" %}
|
||||
<span class="post-meta">Posted on {{ page.date | date: site.date_format }}</span>
|
||||
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -61,7 +63,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if include.type == "post" %}
|
||||
<span class="post-meta">Posted on {{ page.date | date: site.date_format }}</span>
|
||||
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@
|
||||
</button>
|
||||
{%- if site.title-img -%}
|
||||
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img src="{{ site.title-img }}"/></a>
|
||||
{%- else -%}
|
||||
{%- elsif site.title -%}
|
||||
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
34
css/main.css
34
css/main.css
@ -11,7 +11,7 @@ body {
|
||||
font-size: 18px;
|
||||
color: #404040;
|
||||
position: relative;
|
||||
background-color: {{ site.page-col }};
|
||||
background-color: {{ site.page-col | default: "#FFFFFF" }};
|
||||
{% if site.page-img %}
|
||||
background-image: url({{ site.page-img | relative_url }});
|
||||
background-attachment: fixed;
|
||||
@ -26,11 +26,11 @@ h1,h2,h3,h4,h5,h6 {
|
||||
font-weight: 800;
|
||||
}
|
||||
a {
|
||||
color: {{ site.link-col }};
|
||||
color: {{ site.link-col | default: "#008AFF" }};
|
||||
}
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: {{ site.hover-col }};
|
||||
color: {{ site.hover-col | default: "#0085A1" }};
|
||||
}
|
||||
blockquote {
|
||||
color: #808080;
|
||||
@ -68,12 +68,12 @@ hr.small {
|
||||
::-moz-selection {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background-color: {{ site.hover-col }};
|
||||
background-color: {{ site.hover-col | default: "#0085A1" }};
|
||||
}
|
||||
::selection {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background-color: {{ site.hover-col }};
|
||||
background-color: {{ site.hover-col | default: "#0085A1" }};
|
||||
}
|
||||
img::selection {
|
||||
color: white;
|
||||
@ -106,7 +106,7 @@ img {
|
||||
/* --- Navbar --- */
|
||||
|
||||
.navbar-custom {
|
||||
background-color: {{ site.navbar-col }};
|
||||
background-color: {{ site.navbar-col | default: "#F5F5F5" }};
|
||||
border-bottom: 1px solid #EAEAEA;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
{% if site.navbar-img %}
|
||||
@ -124,14 +124,14 @@ img {
|
||||
.navbar-custom .navbar-brand,
|
||||
.navbar-custom .nav li a {
|
||||
font-weight: 800;
|
||||
color: {{ site.navbar-text-col }};
|
||||
color: {{ site.navbar-text-col | default: "#404040" }};
|
||||
}
|
||||
|
||||
.navbar-custom .navbar-brand:hover,
|
||||
.navbar-custom .navbar-brand:focus ,
|
||||
.navbar-custom .nav li a:hover,
|
||||
.navbar-custom .nav li a:focus {
|
||||
color: {{ site.hover-col }};
|
||||
color: {{ site.hover-col | default: "#0085A1" }};
|
||||
}
|
||||
|
||||
.navbar-custom .navbar-brand-logo {
|
||||
@ -231,7 +231,7 @@ img {
|
||||
display: block;
|
||||
padding: 10px;
|
||||
padding-left: 30px;
|
||||
background-color: {{ site.navbar-children-col }};
|
||||
background-color: {{ site.navbar-children-col | default: "#F5F5F5" }};
|
||||
text-decoration: none !important;
|
||||
border-width: 0 1px 1px 1px;
|
||||
font-weight: normal;
|
||||
@ -271,7 +271,7 @@ footer {
|
||||
border-top: 1px #EAEAEA solid;
|
||||
margin-top: 50px;
|
||||
font-size: 14px;
|
||||
background-color: {{ site.footer-col }};
|
||||
background-color: {{ site.footer-col | default: "#F5F5F5" }};
|
||||
{% if site.footer-img %}
|
||||
background-image: url({{ site.footer-img | relative_url }});
|
||||
background-attachment: fixed;
|
||||
@ -279,11 +279,11 @@ footer {
|
||||
}
|
||||
|
||||
footer p.text-muted {
|
||||
color: {{ site.footer-text-col }};
|
||||
color: {{ site.footer-text-col | default: "#777777" }};
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: {{site.footer-link-col}};
|
||||
color: {{ site.footer-link-col | default: "#404040" }};
|
||||
}
|
||||
|
||||
footer .list-inline {
|
||||
@ -337,7 +337,7 @@ footer .theme-by {
|
||||
.post-preview a:focus,
|
||||
.post-preview a:hover {
|
||||
text-decoration: none;
|
||||
color: {{ site.hover-col }};
|
||||
color: {{ site.hover-col | default: "#0085A1" }};
|
||||
}
|
||||
|
||||
.post-preview .post-title {
|
||||
@ -401,14 +401,14 @@ footer .theme-by {
|
||||
}
|
||||
|
||||
.blog-tags a {
|
||||
color: {{ site.link-col }};
|
||||
color: {{ site.link-col | default: "#008AFF" }};
|
||||
text-decoration: none;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.blog-tags a:hover {
|
||||
border-radius: 2px;
|
||||
color: {{ site.hover-col }};
|
||||
color: {{ site.hover-col | default: "#0085A1" }};
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
@ -614,8 +614,8 @@ footer .theme-by {
|
||||
.pager li a:hover,
|
||||
.pager li a:focus {
|
||||
color: #FFF;
|
||||
border: 1px solid {{ site.hover-col }};
|
||||
background-color: {{ site.hover-col }};
|
||||
border: 1px solid {{ site.hover-col | default: "#0085A1" }};
|
||||
background-color: {{ site.hover-col | default: "#0085A1" }};
|
||||
}
|
||||
|
||||
.pager {
|
||||
|
4
feed.xml
4
feed.xml
@ -4,8 +4,12 @@ layout: null
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
{% if site.title %}
|
||||
<title>{{ site.title | xml_escape }}</title>
|
||||
{% endif %}
|
||||
{% if site.description %}
|
||||
<description>{{ site.description | xml_escape }}</description>
|
||||
{% endif %}
|
||||
<link>{{ '' | absolute_url }}</link>
|
||||
<atom:link href="{{ 'feed.xml' | absolute_url }}" rel="self" type="application/rss+xml" />
|
||||
{% for post in site.posts limit:20 %}
|
||||
|
@ -19,7 +19,8 @@ use-site-title: true
|
||||
</a>
|
||||
|
||||
<p class="post-meta">
|
||||
Posted on {{ post.date | date: site.date_format }}
|
||||
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
|
||||
Posted on {{ post.date | date: date_format }}
|
||||
</p>
|
||||
|
||||
<div class="post-entry-container">
|
||||
@ -31,9 +32,10 @@ use-site-title: true
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="post-entry">
|
||||
{{ post.excerpt | strip_html | xml_escape | truncatewords: site.excerpt_length }}
|
||||
{% assign excerpt_length = site.excerpt_length | default: 50 %}
|
||||
{{ post.excerpt | strip_html | xml_escape | truncatewords: excerpt_length }}
|
||||
{% assign excerpt_word_count = post.excerpt | number_of_words %}
|
||||
{% if post.content != post.excerpt or excerpt_word_count > site.excerpt_length %}
|
||||
{% if post.content != post.excerpt or excerpt_word_count > excerpt_length %}
|
||||
<a href="{{ post.url | relative_url }}" class="post-read-more">[Read More]</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -3,6 +3,8 @@ layout: page
|
||||
title: 'Tag Index'
|
||||
---
|
||||
|
||||
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
|
||||
|
||||
{%- capture site_tags -%}
|
||||
{%- for tag in site.tags -%}
|
||||
{{- tag | first -}}{%- unless forloop.last -%},{%- endunless -%}
|
||||
@ -25,7 +27,7 @@ title: 'Tag Index'
|
||||
<div class="tag-entry">
|
||||
<a href="{{ post.url | relative_url }}">{{- post.title -}}</a>
|
||||
<div class="entry-date">
|
||||
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: site.date_format -}}</time>
|
||||
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: date_format -}}</time>
|
||||
</div>
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
|
Loading…
Reference in New Issue
Block a user