aboutsummaryrefslogtreecommitdiff
path: root/_includes
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
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')
-rw-r--r--_includes/assets.html5
-rw-r--r--_includes/feed.html2
-rw-r--r--_includes/meta.html5
-rw-r--r--_includes/social.html22
-rw-r--r--_includes/title.html23
5 files changed, 57 insertions, 0 deletions
diff --git a/_includes/assets.html b/_includes/assets.html
new file mode 100644
index 0000000..e0db38b
--- /dev/null
+++ b/_includes/assets.html
@@ -0,0 +1,5 @@
+{% 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" />
+
+{% comment %}<!-- We have the same JS file for all languages -->{% endcomment %}
+<script src="{{ "/javascripts/dist/main.min.js" | prepend: site.baseurl_root }}"></script>
diff --git a/_includes/feed.html b/_includes/feed.html
new file mode 100644
index 0000000..a8fdaf2
--- /dev/null
+++ b/_includes/feed.html
@@ -0,0 +1,2 @@
+<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" />
diff --git a/_includes/meta.html b/_includes/meta.html
new file mode 100644
index 0000000..a7a0d2c
--- /dev/null
+++ b/_includes/meta.html
@@ -0,0 +1,5 @@
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+
+{% capture description %}{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}{% endcapture %}
+<meta name="description" content="{{ description }}" />
diff --git a/_includes/social.html b/_includes/social.html
new file mode 100644
index 0000000..d3c06ab
--- /dev/null
+++ b/_includes/social.html
@@ -0,0 +1,22 @@
+{% comment %}<!-- OpenGraph protocol -->{% endcomment %}
+{% if site.lang == "ca" %}
+<meta property="og:locale" content="ca_ES" />
+<meta property="og:locale:alternate" content="en_US" />
+<meta property="og:url" content="http://jo.mssola.com{{ page.url }}" />
+{% else %}
+<meta property="og:locale" content="en_US" />
+<meta property="og:locale:alternate" content="ca_ES" />
+<meta property="og:url" content="http://jo.mssola.com/en{{ page.url }}" />
+{% endif %}
+<meta property="og:title" content="{{ title }}" />
+<meta property="og:description" content="{{ description }}" />
+
+{% render_type_tags %}
+
+{% comment %}<!-- Twitter stuff -->{% endcomment %}
+<meta name="twitter:card" content="summary_large_image" />
+<meta name="twitter:site" content="@miquelssola" />
+<meta name="twitter:creator" content="@miquelssola" />
+<meta name="twitter:description" content="{{ description }}" />
+<meta name="twitter:title" content="{{ title }}" />
+{% render_og_image %}
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>