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
59
blog/templates/first-edition/base.html
Normal file
59
blog/templates/first-edition/base.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!doctype html>
|
||||
|
||||
<html lang="{{ config.default_language }}">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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">
|
||||
|
||||
<script async src="/js/main.js"></script>
|
||||
|
||||
<title>{% block title %}{% endblock title %} (First Edition)</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container content">
|
||||
<header class="masthead">
|
||||
<h1 class="masthead-title">
|
||||
<a href="/first-edition" title="Home">{{ config.title }} (First Edition)</a>
|
||||
</h1>
|
||||
<p><small>{{ config.extra.subtitle }}</small></p>
|
||||
</header>
|
||||
|
||||
<main>{% block main %}{% endblock main %}</main>
|
||||
|
||||
<div>{% block after_main %}{% endblock after_main %}</div>
|
||||
|
||||
<footer class="footer">
|
||||
<hr>
|
||||
<small>
|
||||
© <time datetime="2017">2017</time>. All rights reserved.
|
||||
<a href="{{ get_url(path="./pages/contact.md") }}">Contact</a>
|
||||
</small>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//analytics.phil-opp.com/";
|
||||
_paq.push(['setTrackerUrl', u+'js/']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://cdnjs.cloudflare.com/ajax/libs/piwik/3.0.4/piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Piwik Code -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
{% extends "first-edition/section.html" %}
|
||||
|
||||
{% block title %}{{ super() }}{% endblock title %}
|
||||
|
||||
{% block main %}{{ super() }}{% endblock main %}
|
||||
|
||||
{% 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") }}">“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 %}
|
||||
53
blog/templates/first-edition/page.html
Normal file
53
blog/templates/first-edition/page.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends "first-edition/base.html" %}
|
||||
|
||||
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
||||
{{ 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>
|
||||
{% for h2 in page.toc %}<li>
|
||||
<a href="#{{h2.id | safe}}">{{ h2.title | safe }}</a>
|
||||
{% if h2.children %}<ol>
|
||||
{% for h3 in h2.children %}<li>
|
||||
<a href="#{{h3.id | safe}}">{{ h3.title | safe }}</a>
|
||||
</li>{% endfor %}
|
||||
</ol>{% endif %}
|
||||
</li>{% endfor %}
|
||||
</ol>
|
||||
</aside>
|
||||
{{ page.content | safe }}
|
||||
{% endblock main %}
|
||||
|
||||
{% block after_main %}
|
||||
<hr>
|
||||
<div class="PageNavigation">
|
||||
{% if page.previous %}
|
||||
<a class="prev" href="/{{ page.previous.path | safe }}">« {{ page.previous.title }}</a>
|
||||
{% endif %}
|
||||
{% if page.next %}
|
||||
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<script data-isso="//comments.phil-opp.com/fcgi-bin/isso"
|
||||
src="//comments.phil-opp.com/fcgi-bin/isso/js/embed.min.js"></script>
|
||||
<section>
|
||||
<h2>Comments</h2>
|
||||
<section id="isso-thread"></section>
|
||||
</section>
|
||||
|
||||
{% endblock after_main %}
|
||||
|
||||
|
||||
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 %}
|
||||
Reference in New Issue
Block a user