Make chapters sections to avoid rendering them

Instead of redirecting the chapter pages to a 404 site.
This commit is contained in:
Philipp Oppermann
2021-01-07 20:07:43 +01:00
parent 2e52b681ec
commit ec1f80416b
5 changed files with 5 additions and 12 deletions

View File

@@ -1,6 +1,4 @@
+++ +++
title = "Chapters" title = "Chapters"
insert_anchor_links = "left"
render = false render = false
page_template = "redirect-to-404.html"
+++ +++

View File

@@ -1,5 +1,6 @@
+++ +++
title = "Bare Bones" title = "Bare Bones"
render = false
+++ +++
In this first chapter, we explain how to create an operating system for the `x86_64` architecture step for step. Starting from scratch, we first create a minimal Rust executable that doesn't depend on the standard library. We then turn it into a bootable OS kernel by combining it with a bootloader. The resulting disk image can then be launched in the [QEMU](https://www.qemu.org/) emulator or booted on a real machine. In this first chapter, we explain how to create an operating system for the `x86_64` architecture step for step. Starting from scratch, we first create a minimal Rust executable that doesn't depend on the standard library. We then turn it into a bootable OS kernel by combining it with a bootloader. The resulting disk image can then be launched in the [QEMU](https://www.qemu.org/) emulator or booted on a real machine.

View File

@@ -1,5 +1,6 @@
+++ +++
title = "Basic I/O" title = "Basic I/O"
render = false
+++ +++
Soluta cum voluptatem fuga reprehenderit tenetur dicta rerum. Ullam minima eaque saepe voluptatum saepe in illum cumque. Debitis doloribus dolores dolores earum minima accusamus eius. Nostrum qui saepe ducimus laudantium temporibus. Soluta cum voluptatem fuga reprehenderit tenetur dicta rerum. Ullam minima eaque saepe voluptatum saepe in illum cumque. Debitis doloribus dolores dolores earum minima accusamus eius. Nostrum qui saepe ducimus laudantium temporibus.

View File

@@ -42,10 +42,10 @@
{% set chapter_slug = chapter | slugify %} {% set chapter_slug = chapter | slugify %}
<div class="posts {{chapter_slug}}"> <div class="posts {{chapter_slug}}">
{% set chapter_page = get_page(path = "edition-3/chapters/" ~ chapter_slug ~ ".md" ) %} {% set chapter_section = get_section(path = "edition-3/chapters/" ~ chapter_slug ~ "/_index.md" ) %}
<h2>{{ chapter_page.title }}</h2> <h2>{{ chapter_section.title }}</h2>
<div class="chapter-introduction"> <div class="chapter-introduction">
{{ chapter_page.content | safe }} {{ chapter_section.content | safe }}
</div> </div>
<ul> <ul>

View File

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