aboutsummaryrefslogtreecommitdiff
path: root/_layouts/default.html
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2018-02-19 19:56:09 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2018-02-19 19:56:09 +0100
commit60368a105e71f81dc8a10e2c84298464b2a20ccf (patch)
treee35c719c2110b436f95758f7f1ad829123314ddc /_layouts/default.html
parenteac195d44eb1e201ac1b668972e3e2f9f74b2e0a (diff)
downloadjo.mssola.com-60368a105e71f81dc8a10e2c84298464b2a20ccf.tar.gz
jo.mssola.com-60368a105e71f81dc8a10e2c84298464b2a20ccf.zip
script: added a script to generate posts
This way I don't have to remember to specific org headers and such. Moreover, I've also fixed the translation of the titles. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to '_layouts/default.html')
-rw-r--r--_layouts/default.html26
1 files changed, 22 insertions, 4 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index 8db38f6..10b04b3 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -2,18 +2,36 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>{% if page.title %}{{ site.title }} - {% t page.title %}{% else %}{{ site.title }}{% endif %}</title>
+
+ {% comment %}
+ <!--
+ There are three situations:
+
+ 1. We have a page title and it needs translation (it starts with "titles.blabla").
+ 2. We have a page title and it has to be as it is.
+ 3. We don't have a page title (e.g. the main page)
+ -->
+ {% endcomment %}
+ {% if page.title %}
+ {% if page.title contains "titles." %}
+ <title>{{ site.title }} - {% t page.title %}</title>
+ {% else %}
+ <title>{{ site.title }} - {{ page.title }}</title>
+ {% endif %}
+ {% else %}
+ <title>{{ site.title }}</title>
+ {% endif %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
- <!-- We have the same CSS file for all languages -->
+ {% comment %}<!-- We have the same CSS file for all languages -->{% endcomment %}
<link href="{{ "/stylesheets/main.css" | prepend: site.baseurl_root }}" rel="stylesheet" type="text/css" />
- <!-- Empty favicon -->
+ {% comment %}<!-- Empty favicon -->{% endcomment %}
<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon" />
- <!-- Feeds -->
+ {% comment %}<!-- Feeds -->{% endcomment %}
<link href="/feed.xml" type="application/rss+xml" rel="alternate" title="Entrades al blog en català" />
<link href="/feed.en.xml" type="application/rss+xml" rel="alternate" title="Blog posts in english" />
</head>