aboutsummaryrefslogtreecommitdiff
path: root/_includes/title.html
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2021-07-05 21:56:06 +0200
committerMiquel Sabaté Solà <msabate@suse.com>2021-07-05 21:56:06 +0200
commit261b5e3e80d1e75fdcd042675154a82c2ce469fb (patch)
tree33eb31fd719780db67cfac4979d3f699b7525315 /_includes/title.html
parent44756f51c80c1cb104de808afa24ea5027dd1d41 (diff)
downloadjo.mssola.com-261b5e3e80d1e75fdcd042675154a82c2ce469fb.tar.gz
jo.mssola.com-261b5e3e80d1e75fdcd042675154a82c2ce469fb.zip
Added CV section
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to '_includes/title.html')
-rw-r--r--_includes/title.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/_includes/title.html b/_includes/title.html
new file mode 100644
index 0000000..d167a8b
--- /dev/null
+++ b/_includes/title.html
@@ -0,0 +1,23 @@
+{% 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." %}
+ {% capture title %}{{ site.title }} - {% t page.title %}{% endcapture %}
+ {% capture raw_title %}{% t page.title %}{% endcapture %}
+ {% else %}
+ {% capture title %}{{ site.title }} - {{ page.title }}{% endcapture %}
+ {% capture raw_title %}{{ page.title }}{% endcapture %}
+ {% endif %}
+{% else %}
+ {% capture title %}{{ site.title }}{% endcapture %}
+ {% capture raw_title %}{% endcapture %}
+{% endif %}
+
+<title>{{ title }}</title>