Browse Source

add better titles, fix some missing redirects

main
James Fenn 3 weeks ago
parent
commit
a95df8c856
10 changed files with 69 additions and 0 deletions
  1. +1
    -0
      .eleventy.js
  2. +14
    -0
      _includes/layouts/redirect.liquid
  3. +1
    -0
      pages/community.md
  4. +1
    -0
      pages/contact.md
  5. +1
    -0
      pages/now.md
  6. +2
    -0
      pages/projects/docs.html
  7. +2
    -0
      pages/projects/wiki.html
  8. +6
    -0
      redirects/apps-pasta.md
  9. +6
    -0
      redirects/apps-status.md
  10. +35
    -0
      redirects/index.html

+ 1
- 0
.eleventy.js View File

@@ -11,6 +11,7 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addLayoutAlias("default", "layouts/default.liquid");
eleventyConfig.addLayoutAlias("base", "layouts/base.liquid");
eleventyConfig.addLayoutAlias("page", "layouts/page.liquid");
eleventyConfig.addLayoutAlias("redirect", "layouts/redirect.liquid");

eleventyConfig.addPassthroughCopy("favicon.ico");
eleventyConfig.addPassthroughCopy("resume.pdf");


+ 14
- 0
_includes/layouts/redirect.liquid View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Redirecting&hellip;</title>
<link rel="canonical" href="{{ link }}" />
<script>location="{{ link }}";</script>
<meta http-equiv="refresh" content="0; URL='{{ link }}'" />
<meta name="robots" content="noindex" />
</head>
<body>
Redirecting to <a href="{{ link }}">{{ link }}</a>.
</body>
</html>

+ 1
- 0
pages/community.md View File

@@ -1,6 +1,7 @@
---
layout: page
permalink: /community/
title: Community
---

<div class="text">


+ 1
- 0
pages/contact.md View File

@@ -1,6 +1,7 @@
---
layout: page
permalink: /contact/
title: Contact
---

<div class="text">


+ 1
- 0
pages/now.md View File

@@ -1,6 +1,7 @@
---
layout: base
permalink: /now/
title: Now
---

<div style="height: 300px; background-image: url('/images/headers/snowytrees.jpg'); background-size: cover; background-position: center bottom; background-repeat: no-repeat;"></div>


+ 2
- 0
pages/projects/docs.html View File

@@ -5,6 +5,8 @@ pagination:
size: 1
addAllPagesToCollections: true
permalink: "projects/{{ pagination.items[0].id }}/docs/{{ pagination.items[0].path }}.html"
eleventyComputed:
title: "{{ pagination.items[0].title }} Docs"
---

{% for docs in pagination.items %}


+ 2
- 0
pages/projects/wiki.html View File

@@ -5,6 +5,8 @@ pagination:
size: 1
addAllPagesToCollections: true
permalink: "projects/{{ pagination.items[0].id }}/wiki/{{ pagination.items[0].page }}.html"
eleventyComputed:
title: "{{ pagination.items[0].project.title }} Wiki"
---

<div class="bg-dark">


+ 6
- 0
redirects/apps-pasta.md View File

@@ -0,0 +1,6 @@
---
layout: redirect
permalink: /apps/pasta/
link: /projects/pasta-for-spotify/
eleventyExcludeFromCollections: true
---

+ 6
- 0
redirects/apps-status.md View File

@@ -0,0 +1,6 @@
---
layout: redirect
permalink: /apps/status/
link: /projects/status/
eleventyExcludeFromCollections: true
---

+ 35
- 0
redirects/index.html View File

@@ -0,0 +1,35 @@
---
permalink: /redirects/
eleventyExcludeFromCollections: true
---

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Redirecting to...</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<p id="container"></p>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript">
var links = {{ meta.links | dump | safe }};

var array = window.location.search.substring(1).split("&");
var args = {};
for (var i = 0; i < array.length; i++) {
if (array[i].indexOf("=") >= 0) {
var argArray = array[i].split("=");
args[argArray[0]] = argArray[1];
} else args[array[i]] = true;
}

if (links[args.t]) {
var url = links[args.t].url + (args.d != null ? "/" + args.d : "");
document.getElementById("container").innerHTML = "Redirecting to... <a href=\"" + url + "\">" + url + "</a>"
window.location = url;
} else location.href="/404.html";
</script>
</body>
</html>

Loading…
Cancel
Save