aboutsummaryrefslogtreecommitdiff
path: root/_layouts
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-02-05 01:42:23 -0300
committerEuAndreh <eu@euandre.org>2020-02-05 01:42:23 -0300
commite40de080c312f38b692ff687fa10be66951223dc (patch)
treeebedc339f8f3499e1851736193fa2d0f186bc608 /_layouts
parentAdd Jekyll generated website (diff)
downloadeuandre.org-e40de080c312f38b692ff687fa10be66951223dc.tar.gz
euandre.org-e40de080c312f38b692ff687fa10be66951223dc.tar.xz
WIP Jekyll
Diffstat (limited to '')
-rw-r--r--_layouts/default.html (renamed from site/templates/default.html)18
-rw-r--r--_layouts/index.html34
-rw-r--r--_layouts/page.html14
-rw-r--r--_layouts/pastebins.html34
-rw-r--r--_layouts/post.html27
5 files changed, 117 insertions, 10 deletions
diff --git a/site/templates/default.html b/_layouts/default.html
index 2fdf64b..fc9befd 100644
--- a/site/templates/default.html
+++ b/_layouts/default.html
@@ -1,12 +1,12 @@
-<!doctype html>
-<html lang="en">
+<!DOCTYPE html>
+<html lang="{{ page.lang | default: site.lang | default: "en" }}">
<head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>$title$ - EuAndreh's blog</title>
- <link rel="stylesheet" href="/css/styles.css" />
- <link rel="alternate" type="application/atom+xml" href="/feed.atom" title="EuAndreh's Feed" />
+ <link rel="stylesheet" href="/styles.css">
+ <link rel="alternate" type="application/atom+xml" href="/feed.xml" title="EuAndreh's Feed" />
+ {%- seo -%}
</head>
<body>
<header>
@@ -24,8 +24,7 @@
</header>
<main role="main">
- <h1>$title$</h1>
- $body$
+ {{ content }}
</main>
<footer>
@@ -39,7 +38,6 @@
<a href="/public-key.txt">81F90EC3CD356060</a>
</li>
</ul>
-
<p>
The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. The <a href="https://git.sr.ht/~euandreh/website">code</a> is <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 or later</a>.
</p>
diff --git a/_layouts/index.html b/_layouts/index.html
new file mode 100644
index 0000000..8f8ac79
--- /dev/null
+++ b/_layouts/index.html
@@ -0,0 +1,34 @@
+---
+layout: default
+---
+
+<div class="home">
+ {%- if page.title -%}
+ <h1 class="page-heading">{{ page.title }}</h1>
+ {%- endif -%}
+
+ {{ content }}
+
+ {%- if site.posts.size > 0 -%}
+ <h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
+ <ul class="post-list">
+ {%- for post in site.posts -%}
+ <li>
+ {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
+ <span class="post-meta">{{ post.date | date: date_format }}</span>
+ <h3>
+ <a class="post-link" href="{{ post.url | relative_url }}">
+ {{ post.title | escape }}
+ </a>
+ </h3>
+ {%- if site.show_excerpts -%}
+ {{ post.excerpt }}
+ {%- endif -%}
+ </li>
+ {%- endfor -%}
+ </ul>
+
+ <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
+ {%- endif -%}
+
+</div>
diff --git a/_layouts/page.html b/_layouts/page.html
new file mode 100644
index 0000000..01e4b2a
--- /dev/null
+++ b/_layouts/page.html
@@ -0,0 +1,14 @@
+---
+layout: default
+---
+<article class="post">
+
+ <header class="post-header">
+ <h1 class="post-title">{{ page.title | escape }}</h1>
+ </header>
+
+ <div class="post-content">
+ {{ content }}
+ </div>
+
+</article>
diff --git a/_layouts/pastebins.html b/_layouts/pastebins.html
new file mode 100644
index 0000000..0740a04
--- /dev/null
+++ b/_layouts/pastebins.html
@@ -0,0 +1,34 @@
+---
+layout: default
+---
+
+<div class="home">
+ {%- if page.title -%}
+ <h1 class="page-heading">{{ page.title }}</h1>
+ {%- endif -%}
+
+ {{ content }}
+
+ {%- if site.posts.size > 0 -%}
+ <h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
+ <ul class="post-list">
+ {%- for post in site.posts -%}
+ <li>
+ {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
+ <span class="post-meta">{{ post.date | date: date_format }}</span>
+ <h3>
+ <a class="post-link" href="{{ post.url | relative_url }}">
+ {{ post.title | escape }}
+ </a>
+ </h3>
+ {%- if site.show_excerpts -%}
+ {{ post.excerpt }}
+ {%- endif -%}
+ </li>
+ {%- endfor -%}
+ </ul>
+
+ <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
+ {%- endif -%}
+
+</div>
diff --git a/_layouts/post.html b/_layouts/post.html
new file mode 100644
index 0000000..abf9696
--- /dev/null
+++ b/_layouts/post.html
@@ -0,0 +1,27 @@
+---
+layout: default
+---
+<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
+
+ <header class="post-header">
+ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
+ <p class="post-meta">
+ <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
+ {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
+ {{ page.date | date: date_format }}
+ </time>
+ {%- if page.author -%}
+ • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span class="p-author h-card" itemprop="name">{{ page.author }}</span></span>
+ {%- endif -%}</p>
+ </header>
+
+ <div class="post-content e-content" itemprop="articleBody">
+ {{ content }}
+ </div>
+
+ {%- if site.disqus.shortname -%}
+ {%- include disqus_comments.html -%}
+ {%- endif -%}
+
+ <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
+</article>