mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Make second edition the default (#437)
This commit is contained in:
committed by
GitHub
parent
3e3778d982
commit
97ce17925e
@@ -14,14 +14,14 @@
|
||||
|
||||
<script async src="/js/main.js"></script>
|
||||
|
||||
<title>{% block title %}{% endblock title %}</title>
|
||||
<title>{% block title %}{% endblock title %} (First Edition)</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container content">
|
||||
<header class="masthead">
|
||||
<h1 class="masthead-title">
|
||||
<a href="/" title="Home">{{ config.title }}</a>
|
||||
<a href="/first-edition" title="Home">{{ config.title }} (First Edition)</a>
|
||||
</h1>
|
||||
<p><small>{{ config.extra.subtitle }}</small></p>
|
||||
</header>
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "section.html" %}
|
||||
{% extends "first-edition/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="./posts/09-handling-exceptions/index.md") }}">“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="./first-edition/posts/09-handling-exceptions/index.md") }}">“Handling Exceptions”</a> post.</p>
|
||||
|
||||
{% endblock introduction %}
|
||||
66
blog/templates/first-edition/index.html
Normal file
66
blog/templates/first-edition/index.html
Normal file
@@ -0,0 +1,66 @@
|
||||
{% extends "first-edition/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 = posts_section.pages | reverse %}
|
||||
<div class="front-page-introduction">
|
||||
<p>
|
||||
This blog series creates a small operating system in the
|
||||
<a href="https://www.rust-lang.org/">Rust programming language</a>. Each post is a small tutorial and includes all
|
||||
needed code, so you can follow along if you like. The source code is also available in the corresponding
|
||||
<a href="https://github.com/phil-opp/blog_os">Github repository</a>.
|
||||
</p>
|
||||
<p>Latest post:
|
||||
{% set latest_post = posts|last %}
|
||||
<strong><a href="/{{ latest_post.path | safe }}">{{ latest_post.title }}</a></strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="warning">
|
||||
<b>No longer updated!</b> You are viewing the first edition of “Writing an OS in Rust”, which is no longer updated. You can find the second edition <a href="{{ get_url(path = "./second-edition/_index.md") }}">here</a>.
|
||||
</div>
|
||||
|
||||
<div id="bare-bones" class="post-category bare-bones">Bare Bones</div>
|
||||
<div class="posts bare-bones">
|
||||
{{ macros::post_link(page=posts.0) }}
|
||||
{{ macros::post_link(page=posts.1) }}
|
||||
{{ macros::post_link(page=posts.2) }}
|
||||
{{ macros::post_link(page=posts.3) }}
|
||||
</div>
|
||||
|
||||
<div id="memory-management" class="post-category memory-management">Memory Management</div>
|
||||
<div class="posts memory-management">
|
||||
{{ macros::post_link(page=posts.4) }}
|
||||
{{ macros::post_link(page=posts.5) }}
|
||||
{{ macros::post_link(page=posts.6) }}
|
||||
{{ macros::post_link(page=posts.7) }}
|
||||
</div>
|
||||
|
||||
<div id="interrupts" class="post-category exceptions">Exceptions</div>
|
||||
<div class="posts exceptions">
|
||||
{{ macros::post_link(page=posts.8) }}
|
||||
{{ macros::post_link(page=posts.9) }}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
{% set extra = get_section(path = "first-edition/extra/_index.md") %}
|
||||
<h1>{{ extra.title }}</h1>
|
||||
<ul>
|
||||
{% for subsection in extra.subsections|reverse %}
|
||||
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% for page in extra.pages|reverse %}
|
||||
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<aside id="recent-updates">
|
||||
<h2>Recent Updates</h2>
|
||||
{% include "recent-updates.html" %}
|
||||
</aside>
|
||||
|
||||
{% endblock main %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "first-edition/base.html" %}
|
||||
|
||||
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
{{ page.date | date(format="%b %d, %Y") }}
|
||||
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
|
||||
</time>
|
||||
|
||||
<div class="warning">
|
||||
<b>No longer updated!</b> You are viewing the a post of the first edition of “Writing an OS in Rust”, which is no longer updated. You can find the second edition <a href="{{ get_url(path = "./second-edition/_index.md") }}">here</a>.
|
||||
</div>
|
||||
|
||||
<aside id="toc">
|
||||
<h2>Table of Contents</h2>
|
||||
<ol>
|
||||
19
blog/templates/first-edition/section.html
Normal file
19
blog/templates/first-edition/section.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "first-edition/base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block title %}{{ section.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<h1>{{ section.title }}</h1>
|
||||
|
||||
{% block introduction %}{% endblock introduction %}
|
||||
|
||||
<div class="posts neutral">
|
||||
{% for page in section.pages|reverse %}
|
||||
{{ macros::post_link(page=page) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock main %}
|
||||
@@ -1,66 +1 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block title %}{{ config.title }}{% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
{% set posts_section = get_section(path = "posts/_index.md") %}
|
||||
{% set posts = posts_section.pages | reverse %}
|
||||
<div class="front-page-introduction">
|
||||
<p>
|
||||
This blog series creates a small operating system in the
|
||||
<a href="https://www.rust-lang.org/">Rust programming language</a>. Each post is a small tutorial and includes all
|
||||
needed code, so you can follow along if you like. The source code is also available in the corresponding
|
||||
<a href="https://github.com/phil-opp/blog_os">Github repository</a>.
|
||||
</p>
|
||||
<p>Latest post:
|
||||
{% set latest_post = posts|last %}
|
||||
<strong><a href="/{{ latest_post.path | safe }}">{{ latest_post.title }}</a></strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="note">
|
||||
<b>Want to try something new?</b> We are working on a second edition of the blog, which <a href="{{ get_url(path = "./news/2018-03-09-pure-rust.md") }}">works without any non-Rust dependencies</a>. You can read the new posts <a href="{{ get_url(path = "./second-edition/_index.md") }}">here</a>.
|
||||
</div>
|
||||
|
||||
<div id="bare-bones" class="post-category bare-bones">Bare Bones</div>
|
||||
<div class="posts bare-bones">
|
||||
{{ macros::post_link(page=posts.0) }}
|
||||
{{ macros::post_link(page=posts.1) }}
|
||||
{{ macros::post_link(page=posts.2) }}
|
||||
{{ macros::post_link(page=posts.3) }}
|
||||
</div>
|
||||
|
||||
<div id="memory-management" class="post-category memory-management">Memory Management</div>
|
||||
<div class="posts memory-management">
|
||||
{{ macros::post_link(page=posts.4) }}
|
||||
{{ macros::post_link(page=posts.5) }}
|
||||
{{ macros::post_link(page=posts.6) }}
|
||||
{{ macros::post_link(page=posts.7) }}
|
||||
</div>
|
||||
|
||||
<div id="interrupts" class="post-category exceptions">Exceptions</div>
|
||||
<div class="posts exceptions">
|
||||
{{ macros::post_link(page=posts.8) }}
|
||||
{{ macros::post_link(page=posts.9) }}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
{% set extra = get_section(path = "extra/_index.md") %}
|
||||
<h1>{{ extra.title }}</h1>
|
||||
<ul>
|
||||
{% for subsection in extra.subsections|reverse %}
|
||||
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% for page in extra.pages|reverse %}
|
||||
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<aside id="recent-updates">
|
||||
<h2>Recent Updates</h2>
|
||||
{% include "recent-updates.html" %}
|
||||
</aside>
|
||||
|
||||
{% endblock main %}
|
||||
{% extends "second-edition/index.html" %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "second-edition/base.html" %}
|
||||
|
||||
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "second-edition/base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "second-edition/base.html" %}
|
||||
|
||||
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block main %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<div class="warning">
|
||||
<b>Note:</b> This post is part of the upcoming <a href="{{ get_url(path = "./second-edition/_index.md") }}">second edition</a> of “Writing an OS in Rust”, which is still under construction. To read the first edition, go <a href="{{ get_url(path = "/") }}">here</a>.
|
||||
<b>Note:</b> You are viewing the in-progress second edition of “Writing an OS in Rust”. For more content, take a look at the <a href="{{ get_url(path = "/first-edition") }}">first edition</a>.
|
||||
</div>
|
||||
{{ page.content | safe }}
|
||||
{% endblock main %}
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
{% block main %}
|
||||
{% set posts_section = get_section(path = "second-edition/posts/_index.md") %}
|
||||
{% set posts = posts_section.pages | reverse %}
|
||||
<div class="warning">
|
||||
<b>Note:</b> You are viewing the upcoming second edition of “Writing an OS in Rust”, which is still under construction. To read the first edition, go <a href="{{ get_url(path = "/") }}">here</a>.
|
||||
</div>
|
||||
|
||||
<div class="front-page-introduction">
|
||||
<p>
|
||||
This blog series creates a small operating system in the
|
||||
@@ -49,6 +47,11 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="posts first-edition">
|
||||
<h2 class="post-title">First Edition</h2>
|
||||
You are viewing the second edition of “Writing an OS in Rust”, which is still in progress. The <a href="{{ get_url(path = "/first-edition") }}">first edition</a> has more content, but is no longer updated. We try our best to incorporate the missing content soon.
|
||||
</div>
|
||||
|
||||
<aside id="recent-updates">
|
||||
<h2>Recent Updates</h2>
|
||||
{% include "recent-updates.html" %}
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
</li>{% endfor %}
|
||||
</ol>
|
||||
</aside>
|
||||
<div class="warning">
|
||||
<b>Note:</b> This post is part of the upcoming <a href="{{ get_url(path = "./second-edition/_index.md") }}">second edition</a> of “Writing an OS in Rust”, which is still under construction. To read the first edition, go <a href="{{ get_url(path = "/") }}">here</a>.
|
||||
</div>
|
||||
{{ page.content | safe }}
|
||||
{% endblock main %}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "second-edition/base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user