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 -%} - - - {{ title }} - + + + {{ title }} + + + + {%- if page.robots == "block" %} + + {%- endif %} - - + + + + + - - - - - + + + + + + - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/_layouts/redirect.html b/_layouts/redirect.html index f85c62458..40b830a4e 100644 --- a/_layouts/redirect.html +++ b/_layouts/redirect.html @@ -1,9 +1,9 @@ - {% include head.html %} - {% capture redirect_to %}{% if site.lang != 'en' %}/{{ site.lang }}{% endif %}{{ page.redirect_to }}{% endcapture %} + {%- capture redirect_to %}{% if site.lang != 'en' %}/{{ site.lang }}{% endif %}{{ page.redirect_to }}{% endcapture %} + {% include head.html %}
diff --git a/_shortlinks/ads.md b/_shortlinks/ads.md new file mode 100644 index 000000000..faee6f6cc --- /dev/null +++ b/_shortlinks/ads.md @@ -0,0 +1,4 @@ +--- +redirect_to: /documentation/general/ads +title: documentation.categories.general.ads +--- diff --git a/s/subs-gone.md b/_shortlinks/subs-gone.md similarity index 51% rename from s/subs-gone.md rename to _shortlinks/subs-gone.md index 39a6f2b37..1881f649c 100644 --- a/s/subs-gone.md +++ b/_shortlinks/subs-gone.md @@ -1,5 +1,4 @@ --- -layout: redirect -sitemap: false redirect_to: /documentation/bugs-first-aid/database-error +title: documentation.categories.bugs-first-aid.database-error --- diff --git a/s/sync-help.md b/_shortlinks/sync-help.md similarity index 51% rename from s/sync-help.md rename to _shortlinks/sync-help.md index 437337893..68269f173 100644 --- a/s/sync-help.md +++ b/_shortlinks/sync-help.md @@ -1,5 +1,4 @@ --- -layout: redirect -sitemap: false redirect_to: /documentation/general/synchronization +title: documentation.categories.general.synchronization --- diff --git a/s/index.html b/s/index.html new file mode 100644 index 000000000..8dc67c0c5 --- /dev/null +++ b/s/index.html @@ -0,0 +1,28 @@ +--- +layout: internal +title: titles.shortlinks +robots: block +--- + +
+
+

{% t titles.shortlinks %}

+
+
+ +
+
+
+ {%- for link in site.shortlinks %} +
+
+ +

{{ link.url }}

+

{% t link.title %}

+

{{ site.baseurl }}{{ link.redirect_to }}

+
+
+ {%- endfor %} +
+
+