redirects for the old tag urls
This commit is contained in:
35
_includes/head-content.njk
Normal file
35
_includes/head-content.njk
Normal file
@ -0,0 +1,35 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{% set pageTitle %}{{ title }} | {{ metadata.title }}{% endset %}
|
||||
<title>{{ pageTitle }}</title>
|
||||
<meta name="description" content="{{ description or metadata.description }}">
|
||||
<link rel="alternate" href="/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
|
||||
|
||||
<meta property="og:title" content="{{ title or metadata.title }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:description" content="{{ description or metadata.description }}" />
|
||||
<meta property="og:site_name" content="{{ metadata.title }}" />
|
||||
{% if image %}
|
||||
<meta property="og:image" content="/img/{{ image.src | toOgFilename }}" />
|
||||
<meta property="og:image:alt" content="{{ image.alt }}" />
|
||||
{% endif %}
|
||||
|
||||
<meta name="generator" content="{{ eleventy.generator }}">
|
||||
|
||||
{# Fonts #}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:ital,wght@0,200..800;1,200..800&family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&display=swap" rel="stylesheet">
|
||||
|
||||
{# Icons #}
|
||||
<script src="https://kit.fontawesome.com/884dded219.js" crossorigin="anonymous"></script>
|
||||
|
||||
{# Styles #}
|
||||
<style>{% include "css/main.css" %}</style>
|
||||
<style>{% include "css/nav.css" %}</style>
|
||||
<style>{% include "css/print.css" %}</style>
|
||||
|
||||
<style>{% getBundle "css" %}</style>
|
||||
|
||||
<script type="module">{% getBundle "js" %}</script>
|
||||
@ -1,41 +1,7 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{% set pageTitle %}{{ title }} | {{ metadata.title }}{% endset %}
|
||||
<title>{{ pageTitle }}</title>
|
||||
<meta name="description" content="{{ description or metadata.description }}">
|
||||
<link rel="alternate" href="/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
|
||||
|
||||
<meta property="og:title" content="{{ title or metadata.title }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:description" content="{{ description or metadata.description }}" />
|
||||
<meta property="og:site_name" content="{{ metadata.title }}" />
|
||||
{% if image %}
|
||||
<meta property="og:image" content="/img/{{ image.src | toOgFilename }}" />
|
||||
<meta property="og:image:alt" content="{{ image.alt }}" />
|
||||
{% endif %}
|
||||
|
||||
<meta name="generator" content="{{ eleventy.generator }}">
|
||||
|
||||
{# Fonts #}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:ital,wght@0,200..800;1,200..800&family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&display=swap" rel="stylesheet">
|
||||
|
||||
{# Icons #}
|
||||
<script src="https://kit.fontawesome.com/884dded219.js" crossorigin="anonymous"></script>
|
||||
|
||||
{# Styles #}
|
||||
<style>{% include "css/main.css" %}</style>
|
||||
<style>{% include "css/nav.css" %}</style>
|
||||
<style>{% include "css/print.css" %}</style>
|
||||
|
||||
<style>{% getBundle "css" %}</style>
|
||||
|
||||
<script type="module">{% getBundle "js" %}</script>
|
||||
{% include "head-content.njk" %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.njk" %}
|
||||
|
||||
21
_includes/layouts/tag-redirect.njk
Normal file
21
_includes/layouts/tag-redirect.njk
Normal file
@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include "head-content.njk" %}
|
||||
|
||||
<meta http-equiv="refresh" content="0; url=/tags/{{ tag }}">
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.njk" %}
|
||||
|
||||
<main id="main">
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
|
||||
{% include "footer.njk" %}
|
||||
|
||||
<!-- This page `{{ page.url }}` was built on {% currentBuildDate %} -->
|
||||
<body>
|
||||
</html>
|
||||
12
src/meta/tag-redirects.md
Normal file
12
src/meta/tag-redirects.md
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
layout: tag-redirect.njk
|
||||
pagination:
|
||||
data: collections
|
||||
size: 1
|
||||
alias: tag
|
||||
eleventyComputed:
|
||||
permalink: /tag/{{ tag | slugify }}/
|
||||
title: "this page has moved!"
|
||||
---
|
||||
|
||||
If you're not automatically redirected, head to [the new URL for this tag](/tags/{{ tag | slugify }}/).
|
||||
Reference in New Issue
Block a user