diff --git a/_config.yml b/_config.yml index 9f88653f7..a393429a9 100644 --- a/_config.yml +++ b/_config.yml @@ -37,6 +37,9 @@ collections: events: output: true permalink: /events/:year/:month/:title + shortlinks: + output: true + permalink: /s/:slug defaults: - scope: @@ -49,6 +52,13 @@ defaults: type: "events" values: layout: "event" + - scope: + path: "" + type: "shortlinks" + values: + layout: "redirect" + sitemap: false + robots: block # Exclude from processing. # The following items will not be processed, by default. diff --git a/_i18n/en.yml b/_i18n/en.yml index e175fe986..cdeb8b304 100644 --- a/_i18n/en.yml +++ b/_i18n/en.yml @@ -10,6 +10,7 @@ titles: media-kit: "Media Kit" license: "License" privacy: "Privacy Policy" + shortlinks: "Short links" ## Generic strings generic: diff --git a/_includes/head.html b/_includes/head.html index 31df3e305..54bc43152 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,69 +1,71 @@ - {% if page.layout == "blog" or page.layout == "event" %} - {% capture title %}{{ page.title }} – {{ site.title }}{% endcapture %} - {% elsif page.title %} - {% capture title %}{% t page.title %} – {{ site.title }}{% endcapture %} - {% else %} - {% capture title %}{{ site.title }} – {% t homepage.header %}{% endcapture %} - {% endif %} +{% if page.layout == "blog" or page.layout == "event" %} + {%- capture title %}{{ page.title }} – {{ site.title }}{% endcapture %} +{%- elsif page.title %} + {%- capture title %}{% t page.title %} – {{ site.title }}{% endcapture %} +{%- else %} + {%- capture title %}{{ site.title }} – {% t homepage.header %}{% endcapture %} +{%- endif %} - {% if page.layout == "blog" or page.layout == "doc" or page.layout == "event" %} - {% capture descrlong %}{{ page.excerpt }}{% endcapture %} - {% elsif page.excerpt %} - {% capture descrlong %}{% t page.excerpt %}{% endcapture %} - {% else %} - {% capture descrlong %}{% t homepage.description %}{% endcapture %} - {% endif %} - {% capture description %}{{ descrlong | strip | strip_html | strip_newlines | truncate: 180 }}{% endcapture %} +{%- if page.layout == "blog" or page.layout == "doc" or page.layout == "event" %} + {%- capture descrlong %}{{ page.excerpt }}{% endcapture %} +{%- elsif page.excerpt %} + {%- capture descrlong %}{% t page.excerpt %}{% endcapture %} +{%- else %} + {%- capture descrlong %}{% t homepage.description %}{% endcapture %} +{%- endif %} +{%- capture description %}{{ descrlong | strip | strip_html | strip_newlines | truncate: 180 }}{% endcapture %} - {% capture image %} - {% if page.layout == 'blog' %} - /assets/images/blog/{{ page.image }} - {% elsif page.image %} - /assets/images/{{ page.image }} - {% else %} - /assets/branding/covers/cover_001.png - {% endif %} - {% endcapture %} - {% assign image = image | strip | prepend: site.url %} +{%- capture image %} + {%- if page.layout == 'blog' %} + /assets/images/blog/{{ page.image }} + {%- elsif page.image %} + /assets/images/{{ page.image }} + {%- else %} + /assets/branding/covers/cover_001.png + {%- endif %} +{%- endcapture %} +{%- assign image = image | strip | prepend: site.url -%} - - -