Use Zola's aliases feature instead of Netlify redirects

Makes the project less dependent on Netlify.
This commit is contained in:
Philipp Oppermann
2019-04-24 12:07:00 +02:00
parent 1ff397f568
commit fd2ac6ef18
19 changed files with 40 additions and 55 deletions

View File

@@ -2,6 +2,7 @@
title = "Catching Exceptions" title = "Catching Exceptions"
weight = 1 weight = 1
path = "catching-exceptions" path = "catching-exceptions"
aliases = ["catching-exceptions.html"]
date = 2016-05-28 date = 2016-05-28
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -2,6 +2,7 @@
title = "Better Exception Messages" title = "Better Exception Messages"
weight = 2 weight = 2
path = "better-exception-messages" path = "better-exception-messages"
aliases = ["better-exception-messages.html"]
date = 2016-08-03 date = 2016-08-03
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -2,6 +2,7 @@
title = "Returning from Exceptions" title = "Returning from Exceptions"
weight = 3 weight = 3
path = "returning-from-exceptions" path = "returning-from-exceptions"
aliases = ["returning-from-exceptions.html"]
date = 2016-09-21 date = 2016-09-21
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -1,7 +1,8 @@
+++ +++
title = "A minimal Multiboot Kernel" title = "A minimal Multiboot Kernel"
weight = 1 weight = 1
path = "multiboot-kernel/" path = "multiboot-kernel"
aliases = ["multiboot-kernel.html", "/2015/08/18/multiboot-kernel/", "/rust-os/multiboot-kernel.html"]
date = 2015-08-18 date = 2015-08-18
template = "first-edition/page.html" template = "first-edition/page.html"
+++ +++

View File

@@ -2,6 +2,7 @@
title = "Entering Long Mode" title = "Entering Long Mode"
weight = 2 weight = 2
path = "entering-longmode" path = "entering-longmode"
aliases = ["entering-longmode.html", "/2015/08/25/entering-longmode/", "/rust-os/entering-longmode.html"]
date = 2015-08-25 date = 2015-08-25
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -2,6 +2,7 @@
title = "Set Up Rust" title = "Set Up Rust"
weight = 3 weight = 3
path = "set-up-rust" path = "set-up-rust"
aliases = ["set-up-rust.html", "setup-rust.html", "/2015/09/02/setup-rust/", "/rust-os/setup-rust.html"]
date = 2015-09-02 date = 2015-09-02
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -2,6 +2,7 @@
title = "Printing to Screen" title = "Printing to Screen"
weight = 4 weight = 4
path = "printing-to-screen" path = "printing-to-screen"
aliases = ["printing-to-screen.html", "/2015/10/23/printing-to-screen/", "/rust-os/printing-to-screen.html"]
date = 2015-10-23 date = 2015-10-23
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -2,6 +2,7 @@
title = "Allocating Frames" title = "Allocating Frames"
weight = 5 weight = 5
path = "allocating-frames" path = "allocating-frames"
aliases = ["allocating-frames.html"]
date = 2015-11-15 date = 2015-11-15
template = "first-edition/page.html" template = "first-edition/page.html"
+++ +++

View File

@@ -2,6 +2,7 @@
title = "Page Tables" title = "Page Tables"
weight = 6 weight = 6
path = "page-tables" path = "page-tables"
aliases = ["page-tables.html", "modifying-page-tables.html"]
date = 2015-12-09 date = 2015-12-09
template = "first-edition/page.html" template = "first-edition/page.html"
+++ +++

View File

@@ -2,6 +2,7 @@
title = "Remap the Kernel" title = "Remap the Kernel"
weight = 7 weight = 7
path = "remap-the-kernel" path = "remap-the-kernel"
aliases = ["remap-the-kernel.html"]
date = 2016-01-01 date = 2016-01-01
template = "first-edition/page.html" template = "first-edition/page.html"
[extra] [extra]

View File

@@ -2,6 +2,7 @@
title = "Kernel Heap" title = "Kernel Heap"
weight = 8 weight = 8
path = "kernel-heap" path = "kernel-heap"
aliases = ["kernel-heap.html"]
date = 2016-04-11 date = 2016-04-11
updated = "2017-11-19" updated = "2017-11-19"
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -2,6 +2,7 @@
title = "Handling Exceptions" title = "Handling Exceptions"
weight = 9 weight = 9
path = "handling-exceptions" path = "handling-exceptions"
aliases = ["handling-exceptions.html"]
date = 2017-03-26 date = 2017-03-26
template = "first-edition/page.html" template = "first-edition/page.html"
+++ +++

View File

@@ -2,6 +2,7 @@
title = "Double Faults" title = "Double Faults"
weight = 10 weight = 10
path = "double-faults" path = "double-faults"
aliases = ["double-faults.html"]
date = 2017-01-02 date = 2017-01-02
template = "first-edition/page.html" template = "first-edition/page.html"
+++ +++

View File

@@ -1,6 +1,7 @@
+++ +++
title = "Writing an OS in pure Rust" title = "Writing an OS in pure Rust"
date = 2018-03-09 date = 2018-03-09
aliases = ["news/2018-03-09-pure-rust"]
template = "news-page.html" template = "news-page.html"
+++ +++

View File

@@ -1,4 +1,4 @@
+++ +++
title = "Second Edition" title = "Second Edition"
template = "second-edition/index.html" template = "redirect-to-frontpage.html"
+++ +++

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<link rel="canonical" href="/rss.xml" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url=/rss.xml" />
</head>
</html>

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<link rel="canonical" href="/first-edition/extra/naked-exceptions/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url=/first-edition/extra/naked-exceptions/" />
</head>
</html>

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<link rel="canonical" href="{{ config.base_url }}" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ config.base_url }}" />
</head>
</html>

View File

@@ -11,56 +11,3 @@
[context.branch-deploy] [context.branch-deploy]
command = "python before_build.py && curl -sL https://github.com/getzola/zola/releases/download/v0.6.0/zola-v0.6.0-x86_64-unknown-linux-gnu.tar.gz | tar zxv && ./zola build --base-url $DEPLOY_PRIME_URL" command = "python before_build.py && curl -sL https://github.com/getzola/zola/releases/download/v0.6.0/zola-v0.6.0-x86_64-unknown-linux-gnu.tar.gz | tar zxv && ./zola build --base-url $DEPLOY_PRIME_URL"
[[redirects]]
from = "/second-edition/"
to = "/"
[[redirects]]
from = "/2015/08/18/multiboot-kernel/"
to = "/multiboot-kernel/"
[[redirects]]
from = "/rust-os/multiboot-kernel.html"
to = "/multiboot-kernel/"
[[redirects]]
from = "/2015/08/25/entering-longmode/"
to = "/entering-longmode/"
[[redirects]]
from = "/rust-os/entering-longmode.html"
to = "/entering-longmode/"
[[redirects]]
from = "/2015/09/02/setup-rust/"
to = "/set-up-rust/"
[[redirects]]
from = "/setup-rust.html"
to = "/set-up-rust/"
[[redirects]]
from = "/rust-os/setup-rust.html"
to = "/set-up-rust/"
[[redirects]]
from = "/2015/10/23/printing-to-screen/"
to = "/printing-to-screen/"
[[redirects]]
from = "/rust-os/printing-to-screen.html"
to = "/printing-to-screen/"
[[redirects]]
from = "/atom.xml"
to = "/rss.xml"
[[redirects]]
from = "/modifying-page-tables.html"
to = "/page-tables/"
[[redirects]]
from = "/handling-exceptions-with-naked-fns.html"
to = "/extra/naked-exceptions/"