diff options
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/aside.html | 41 | ||||
-rw-r--r-- | _includes/contacts.html | 11 | ||||
-rw-r--r-- | _includes/head.html | 16 | ||||
-rw-r--r-- | _includes/links.html | 11 | ||||
-rw-r--r-- | _includes/posts.html | 10 |
5 files changed, 38 insertions, 51 deletions
diff --git a/_includes/aside.html b/_includes/aside.html deleted file mode 100644 index 311b826..0000000 --- a/_includes/aside.html +++ /dev/null @@ -1,41 +0,0 @@ -<aside class="sidebar"> - <div class="avatar"> - <img alt="[Avatar]" src="{{ site.avatar | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" /> - </div> - - <p>{{ site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</p> - - {% for link in site.data.aside_links %} - <p> - <span>{{ link.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span> - - <a href="{{ link.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" target="_blank"> - {{ link.tag | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }} - </a> - </p> - {% endfor %} - - <h4>Recent Posts</h4> - - {% for post in site.posts limit: 5 %} - <div> - <small> - <time datetime="{{ post.date | date_to_xmlschema }}"> - {{ post.date | date: '%Y-%m-%d' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }} - </time> - </small> - » - <a href="{{ post.url | relative_url | uri_escape }}"> - {{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }} - </a> - </div> - {% endfor %} - - <h4>License</h4> - - <p> - The content for this site is <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>. - The <a href="{{ site.repos | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" target="_blank">code</a> - for this site is <a href="https://opensource.org/licenses/MIT" target="_blank">MIT</a>. - </p> -</aside> diff --git a/_includes/contacts.html b/_includes/contacts.html new file mode 100644 index 0000000..6a9cef4 --- /dev/null +++ b/_includes/contacts.html @@ -0,0 +1,11 @@ +<h2>Contacts</h2> + +<ul> + {% for contact in site.data.contacts %} + <li> + <a href="{{ contact.url | relative_url | uri_escape }}" target="_blank">{{ contact.title | strip | normalize_whitespace | xml_escape }}</a> + <span>—</span> + <span>{{ contact.description | strip | normalize_whitespace | xml_escape }}</span> + </li> + {% endfor %} +</ul> diff --git a/_includes/head.html b/_includes/head.html index 9078aad..e7fe582 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,6 +1,3 @@ -{% assign description = page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %} -{% assign title = page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %} - <head> <!-- Meta tags --> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1, shrink-to-fit=no, width=device-width" /> @@ -11,21 +8,20 @@ <!-- Advanced meta tags --> {% for tag in site.data.meta_tags %} - <meta name="{{ tag.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" - content="{{ tag.content | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" /> + <meta name="{{ tag.name | strip | normalize_whitespace | xml_escape }}" content="{{ tag.content | strip | normalize_whitespace | xml_escape }}" /> {% endfor %} <!-- Open Graph --> - <meta property="og:title" content="{{ title }}" /> - <meta property="og:description" content="{{ description }}" /> + <meta property="og:title" content="{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}" /> + <meta property="og:description" content="{{ page.description | default: site.description | strip | normalize_whitespace | xml_escape }}" /> <meta property="og:type" content="{{ page.layout | replace: 'post', 'article' | replace: 'page', 'website' | default: 'website' }}" /> <meta property="og:image" content="{{ page.image | absolute_url | uri_escape }}" /> <meta property="og:url" content="{{ page.url | absolute_url | uri_escape }}" /> <!-- Title / Description --> - <meta name="application-name" content="{{ title }}" /> - <meta name="description" content="{{ description }}" /> - <title>{{ title }}</title> + <meta name="application-name" content="{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}" /> + <meta name="description" content="{{ page.description | default: site.description | strip | normalize_whitespace | xml_escape }}" /> + <title>{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}</title> <!-- CSS --> <link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url | uri_escape }}" /> diff --git a/_includes/links.html b/_includes/links.html new file mode 100644 index 0000000..8d40d6d --- /dev/null +++ b/_includes/links.html @@ -0,0 +1,11 @@ +<h2>Related links</h2> + +<ul> + {% for link in site.data.links %} + <li> + <a href="{{ link.url | relative_url | uri_escape }}" target="_blank">{{ link.title | strip | normalize_whitespace | xml_escape }}</a> + <span>—</span> + <span>{{ link.description | strip | normalize_whitespace | xml_escape }}</span> + </li> + {% endfor %} +</ul> diff --git a/_includes/posts.html b/_includes/posts.html new file mode 100644 index 0000000..4638c9b --- /dev/null +++ b/_includes/posts.html @@ -0,0 +1,10 @@ +<h2>Posts</h2> + +<ul> + {% for post in site.posts %} + <li> + <a href="{{ post.url | relative_url | uri_escape }}">{{ post.title | strip | normalize_whitespace | xml_escape }}</a> + (<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%d-%m-%Y' | strip | normalize_whitespace | xml_escape }}</time>) + </li> + {% endfor %} +</ul> |