Rename first-edition subfolder to edition-1

This commit is contained in:
Philipp Oppermann
2020-12-16 14:36:34 +01:00
parent f6416c1e6b
commit 4a9ea6c503
103 changed files with 1077 additions and 135 deletions

View File

@@ -9,11 +9,11 @@
<meta name="description" content="{{ config.description }}">
<meta name="author" content="{{ config.extra.author.name }}">
<link href="/css/poole.css" rel="stylesheet">
<link href="/css/main.css" rel="stylesheet">
<link href="/css/first-edition-isso.css" rel="stylesheet">
<link href="/css/edition-1/poole.css" rel="stylesheet">
<link href="/css/edition-1/main.css" rel="stylesheet">
<link href="/css/edition-1/isso.css" rel="stylesheet">
<script async src="/js/main.js"></script>
<script async src="/js/edition-1/main.js"></script>
<title>{% block title %}{% endblock title %} (First Edition)</title>
</head>
@@ -22,7 +22,7 @@
<div class="container content">
<header class="masthead">
<h2 class="masthead-title">
<a href="/first-edition" title="Home">{{ config.title }} (First Edition)</a>
<a href="/edition-1" title="Home">{{ config.title }} (First Edition)</a>
</h2>
<p><small>{{ config.extra.subtitle | replace(from=" ", to="&nbsp;") | safe }}</small></p>
</header>

View File

@@ -0,0 +1,31 @@
{% macro comment(page) %}
{% if page.path == "/multiboot-kernel/" %}
{% include "edition-1/comments/multiboot-kernel.html" %}
{% elif page.path == "/entering-longmode/" %}
{% include "edition-1/comments/entering-longmode.html" %}
{% elif page.path == "/set-up-rust/" %}
{% include "edition-1/comments/set-up-rust.html" %}
{% elif page.path == "/printing-to-screen/" %}
{% include "edition-1/comments/printing-to-screen.html" %}
{% elif page.path == "/allocating-frames/" %}
{% include "edition-1/comments/allocating-frames.html" %}
{% elif page.path == "/page-tables/" %}
{% include "edition-1/comments/page-tables.html" %}
{% elif page.path == "/remap-the-kernel/" %}
{% include "edition-1/comments/remap-the-kernel.html" %}
{% elif page.path == "/kernel-heap/" %}
{% include "edition-1/comments/kernel-heap.html" %}
{% elif page.path == "/handling-exceptions/" %}
{% include "edition-1/comments/handling-exceptions.html" %}
{% elif page.path == "/double-faults/" %}
{% include "edition-1/comments/double-faults.html" %}
{% elif page.path == "/catching-exceptions/" %}
{% include "edition-1/comments/catching-exceptions.html" %}
{% elif page.path == "/better-exception-messages/" %}
{% include "edition-1/comments/better-exception-messages.html" %}
{% elif page.path == "/returning-from-exceptions/" %}
{% include "edition-1/comments/returning-from-exceptions.html" %}
{% else %}
No comments.
{% endif %}
{% endmacro comment %}

View File

@@ -1,4 +1,4 @@
{% extends "first-edition/section.html" %}
{% extends "edition-1/section.html" %}
{% block title %}{{ super() }}{% endblock title %}
@@ -6,6 +6,6 @@
{% block introduction %}
<p>These posts explain how to handle CPU exceptions using naked functions. Historically, these posts were the main exception handling posts before the <code>x86-interrupt</code> calling convention and the <code>x86_64</code> crate existed. Our new way of handling exceptions can be found in the <a href="{{ get_url(path="@/first-edition/posts/09-handling-exceptions/index.md") | safe }}">“Handling Exceptions”</a> post.</p>
<p>These posts explain how to handle CPU exceptions using naked functions. Historically, these posts were the main exception handling posts before the <code>x86-interrupt</code> calling convention and the <code>x86_64</code> crate existed. Our new way of handling exceptions can be found in the <a href="{{ get_url(path="@/edition-1/posts/09-handling-exceptions/index.md") | safe }}">“Handling Exceptions”</a> post.</p>
{% endblock introduction %}

View File

@@ -1,11 +1,11 @@
{% extends "first-edition/base.html" %}
{% extends "edition-1/base.html" %}
{% import "macros.html" as macros %}
{% block title %}{{ config.title }}{% endblock title %}
{% block main %}
{% set posts_section = get_section(path = "first-edition/posts/_index.md") %}
{% set posts_section = get_section(path = "edition-1/posts/_index.md") %}
{% set posts = posts_section.pages %}
<h1 style="visibility: hidden; height: 0px; margin: 0px; padding: 0px;">Writing an OS in Rust (First Edition)</h1>
@@ -50,7 +50,7 @@
</div>
<hr>
{% set extra = get_section(path = "first-edition/extra/_index.md") %}
{% set extra = get_section(path = "edition-1/extra/_index.md") %}
<h2>{{ extra.title }}</h2>
<ul>
{% for subsection_path in extra.subsections %}

View File

@@ -1,6 +1,6 @@
{% extends "first-edition/base.html" %}
{% extends "edition-1/base.html" %}
{% import "first-edition/comments.html" as comments %}
{% import "edition-1/comments.html" as comments %}
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}

View File

@@ -1,4 +1,4 @@
{% extends "first-edition/base.html" %}
{% extends "edition-1/base.html" %}
{% import "macros.html" as macros %}

View File

@@ -1,31 +0,0 @@
{% macro comment(page) %}
{% if page.path == "/multiboot-kernel/" %}
{% include "first-edition/comments/multiboot-kernel.html" %}
{% elif page.path == "/entering-longmode/" %}
{% include "first-edition/comments/entering-longmode.html" %}
{% elif page.path == "/set-up-rust/" %}
{% include "first-edition/comments/set-up-rust.html" %}
{% elif page.path == "/printing-to-screen/" %}
{% include "first-edition/comments/printing-to-screen.html" %}
{% elif page.path == "/allocating-frames/" %}
{% include "first-edition/comments/allocating-frames.html" %}
{% elif page.path == "/page-tables/" %}
{% include "first-edition/comments/page-tables.html" %}
{% elif page.path == "/remap-the-kernel/" %}
{% include "first-edition/comments/remap-the-kernel.html" %}
{% elif page.path == "/kernel-heap/" %}
{% include "first-edition/comments/kernel-heap.html" %}
{% elif page.path == "/handling-exceptions/" %}
{% include "first-edition/comments/handling-exceptions.html" %}
{% elif page.path == "/double-faults/" %}
{% include "first-edition/comments/double-faults.html" %}
{% elif page.path == "/catching-exceptions/" %}
{% include "first-edition/comments/catching-exceptions.html" %}
{% elif page.path == "/better-exception-messages/" %}
{% include "first-edition/comments/better-exception-messages.html" %}
{% elif page.path == "/returning-from-exceptions/" %}
{% include "first-edition/comments/returning-from-exceptions.html" %}
{% else %}
No comments.
{% endif %}
{% endmacro comment %}

View File

@@ -66,7 +66,7 @@
<div class="frontpage-section">
<h2 class="post-title">First Edition</h2>
<p>You are currently viewing the second edition of “Writing an OS in Rust”. The first edition is very different in many aspects, for example it builds upon the GRUB bootloader instead of using the `bootloader` crate. In case you're interested in it, it is still available. Note that the first edition is no longer updated and might contain outdated information. <a class="read-more" href="{{ get_url(path = "first-edition") | safe }}"><em>read&nbsp;the&nbsp;first edition&nbsp;»</em></a></p>
<p>You are currently viewing the second edition of “Writing an OS in Rust”. The first edition is very different in many aspects, for example it builds upon the GRUB bootloader instead of using the `bootloader` crate. In case you're interested in it, it is still available. Note that the first edition is no longer updated and might contain outdated information. <a class="read-more" href="{{ get_url(path = "edition-1") | safe }}"><em>read&nbsp;the&nbsp;first edition&nbsp;»</em></a></p>
</div>
<div class="">