Merge pull request #534 from phil-opp/zola

Update from Gutenberg 0.3.3 to Zola 0.5.1
This commit is contained in:
Philipp Oppermann
2019-01-22 18:48:15 +01:00
committed by GitHub
47 changed files with 75 additions and 73 deletions

View File

@@ -2,5 +2,5 @@
title = "Extra Content" title = "Extra Content"
insert_anchor_links = "left" insert_anchor_links = "left"
render = false render = false
sort_by = "order" sort_by = "weight"
+++ +++

View File

@@ -2,7 +2,7 @@
title = "Cross Compile Binutils" title = "Cross Compile Binutils"
template = "plain.html" template = "plain.html"
path = "cross-compile-binutils" path = "cross-compile-binutils"
order = 2 weight = 2
+++ +++
The [GNU Binutils] are a collection of various binary tools such as `ld`, `as`, `objdump`, or `readelf`. These tools are platform-specific, so you need to compile them again if your host system and target system are different. In our case, we need `ld` and `objdump` for the x86_64 architecture. The [GNU Binutils] are a collection of various binary tools such as `ld`, `as`, `objdump`, or `readelf`. These tools are platform-specific, so you need to compile them again if your host system and target system are different. In our case, we need `ld` and `objdump` for the x86_64 architecture.

View File

@@ -2,7 +2,7 @@
title = "Cross Compiling: libcore" title = "Cross Compiling: libcore"
template = "plain.html" template = "plain.html"
path = "cross-compile-libcore" path = "cross-compile-libcore"
order = 3 weight = 3
+++ +++
If you get an `error: can't find crate for 'core'`, you're probably compiling for a different target (e.g. you're passing the `target` option to `cargo build`). Now the compiler complains that it can't find the `core` library. This document gives a quick overview how to fix this problem. For more details, see the [rust-cross] project. If you get an `error: can't find crate for 'core'`, you're probably compiling for a different target (e.g. you're passing the `target` option to `cargo build`). Now the compiler complains that it can't find the `core` library. This document gives a quick overview how to fix this problem. For more details, see the [rust-cross] project.

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Catching Exceptions" title = "Catching Exceptions"
order = 1 weight = 1
path = "catching-exceptions" path = "catching-exceptions"
date = 2016-05-28 date = 2016-05-28
template = "first-edition/page.html" template = "first-edition/page.html"

View File

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

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Returning from Exceptions" title = "Returning from Exceptions"
order = 3 weight = 3
path = "returning-from-exceptions" path = "returning-from-exceptions"
date = 2016-09-21 date = 2016-09-21
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Handling Exceptions using naked Functions" title = "Handling Exceptions using naked Functions"
sort_by = "order" sort_by = "weight"
template = "first-edition/handling-exceptions-with-naked-fns.html" template = "first-edition/handling-exceptions-with-naked-fns.html"
insert_anchor_links = "left" insert_anchor_links = "left"
+++ +++

View File

@@ -2,7 +2,7 @@
title = "Set Up GDB" title = "Set Up GDB"
template = "plain.html" template = "plain.html"
path = "set-up-gdb" path = "set-up-gdb"
order = 4 weight = 4
+++ +++
There are a lot of things that can go wrong when developing an OS. So it's a good idea to add a debugger to our toolset, which allows us to set breakpoints and examine variables. We will use [GDB](https://www.gnu.org/software/gdb/) as QEMU supports it out of the box. There are a lot of things that can go wrong when developing an OS. So it's a good idea to add a debugger to our toolset, which allows us to set breakpoints and examine variables. We will use [GDB](https://www.gnu.org/software/gdb/) as QEMU supports it out of the box.

View File

@@ -2,7 +2,7 @@
title = "Talks" title = "Talks"
path = "talks" path = "talks"
template = "plain.html" template = "plain.html"
order = 1 weight = 1
+++ +++
## 2018 ## 2018

View File

@@ -1,6 +1,6 @@
+++ +++
title = "A minimal Multiboot Kernel" title = "A minimal Multiboot Kernel"
order = 1 weight = 1
path = "multiboot-kernel/" path = "multiboot-kernel/"
date = 2015-08-18 date = 2015-08-18
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Entering Long Mode" title = "Entering Long Mode"
order = 2 weight = 2
path = "entering-longmode" path = "entering-longmode"
date = 2015-08-25 date = 2015-08-25
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Set Up Rust" title = "Set Up Rust"
order = 3 weight = 3
path = "set-up-rust" path = "set-up-rust"
date = 2015-09-02 date = 2015-09-02
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Printing to Screen" title = "Printing to Screen"
order = 4 weight = 4
path = "printing-to-screen" path = "printing-to-screen"
date = 2015-10-23 date = 2015-10-23
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Allocating Frames" title = "Allocating Frames"
order = 5 weight = 5
path = "allocating-frames" path = "allocating-frames"
date = 2015-11-15 date = 2015-11-15
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Page Tables" title = "Page Tables"
order = 6 weight = 6
path = "page-tables" path = "page-tables"
date = 2015-12-09 date = 2015-12-09
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Remap the Kernel" title = "Remap the Kernel"
order = 7 weight = 7
path = "remap-the-kernel" path = "remap-the-kernel"
date = 2016-01-01 date = 2016-01-01
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Kernel Heap" title = "Kernel Heap"
order = 8 weight = 8
path = "kernel-heap" path = "kernel-heap"
date = 2016-04-11 date = 2016-04-11
updated = "2017-11-19" updated = "2017-11-19"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Handling Exceptions" title = "Handling Exceptions"
order = 9 weight = 9
path = "handling-exceptions" path = "handling-exceptions"
date = 2017-03-26 date = 2017-03-26
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Double Faults" title = "Double Faults"
order = 10 weight = 10
path = "double-faults" path = "double-faults"
date = 2017-01-02 date = 2017-01-02
template = "first-edition/page.html" template = "first-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Posts" title = "Posts"
sort_by = "order" sort_by = "weight"
insert_anchor_links = "left" insert_anchor_links = "left"
render = false render = false
+++ +++

View File

@@ -1,13 +0,0 @@
+++
title = "Page not found"
path = "404.html"
template = "plain.html"
+++
Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
[Head back home](/) to try finding it again.
If you followed a link on this site, please [report it]!
[report it]: https://github.com/phil-opp/blog_os/issues

View File

@@ -2,5 +2,5 @@
title = "Extra Content" title = "Extra Content"
insert_anchor_links = "left" insert_anchor_links = "left"
render = false render = false
sort_by = "order" sort_by = "weight"
+++ +++

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Building on Android" title = "Building on Android"
order = 3 weight = 3
template = "second-edition/extra.html" template = "second-edition/extra.html"
+++ +++

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Disable the Red Zone" title = "Disable the Red Zone"
order = 1 weight = 1
path = "red-zone" path = "red-zone"
template = "second-edition/extra.html" template = "second-edition/extra.html"
+++ +++

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Disable SIMD" title = "Disable SIMD"
order = 2 weight = 2
path = "disable-simd" path = "disable-simd"
template = "second-edition/extra.html" template = "second-edition/extra.html"
+++ +++

View File

@@ -1,6 +1,6 @@
+++ +++
title = "A Freestanding Rust Binary" title = "A Freestanding Rust Binary"
order = 1 weight = 1
path = "freestanding-rust-binary" path = "freestanding-rust-binary"
date = 2018-02-10 date = 2018-02-10
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "A Minimal Rust Kernel" title = "A Minimal Rust Kernel"
order = 2 weight = 2
path = "minimal-rust-kernel" path = "minimal-rust-kernel"
date = 2018-02-10 date = 2018-02-10
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "VGA Text Mode" title = "VGA Text Mode"
order = 3 weight = 3
path = "vga-text-mode" path = "vga-text-mode"
date = 2018-02-26 date = 2018-02-26
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Unit Testing" title = "Unit Testing"
order = 4 weight = 4
path = "unit-testing" path = "unit-testing"
date = 2018-04-29 date = 2018-04-29
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Integration Tests" title = "Integration Tests"
order = 5 weight = 5
path = "integration-tests" path = "integration-tests"
date = 2018-06-15 date = 2018-06-15
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "CPU Exceptions" title = "CPU Exceptions"
order = 6 weight = 6
path = "cpu-exceptions" path = "cpu-exceptions"
date = 2018-06-17 date = 2018-06-17
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Double Faults" title = "Double Faults"
order = 7 weight = 7
path = "double-fault-exceptions" path = "double-fault-exceptions"
date = 2018-06-18 date = 2018-06-18
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Hardware Interrupts" title = "Hardware Interrupts"
order = 8 weight = 8
path = "hardware-interrupts" path = "hardware-interrupts"
date = 2018-10-22 date = 2018-10-22
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Introduction to Paging" title = "Introduction to Paging"
order = 9 weight = 9
path = "paging-introduction" path = "paging-introduction"
date = 2019-01-14 date = 2019-01-14
template = "second-edition/page.html" template = "second-edition/page.html"

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Posts" title = "Posts"
sort_by = "order" sort_by = "weight"
insert_anchor_links = "left" insert_anchor_links = "left"
render = false render = false
+++ +++

View File

@@ -243,7 +243,7 @@ a code {
color: #268bd2; color: #268bd2;
} }
a.gutenberg-anchor { a.zola-anchor {
opacity: 0; opacity: 0;
position: absolute; position: absolute;
margin-left: -1.5em; margin-left: -1.5em;
@@ -253,12 +253,12 @@ a.gutenberg-anchor {
line-height: 2em; line-height: 2em;
} }
:hover>a.gutenberg-anchor { :hover>a.zola-anchor {
opacity: 1; opacity: 1;
text-decoration: none; text-decoration: none;
} }
a.gutenberg-anchor:hover { a.zola-anchor:hover {
text-decoration: none; text-decoration: none;
} }

12
blog/templates/404.html Normal file
View File

@@ -0,0 +1,12 @@
{% extends "second-edition/base.html" %}
{% block title %}Page not found | {{ config.title }}{% endblock title %}
{% block main %}
<h1>Page not found</h1>
<p>Sorry, this address is not valid.</p>
<p><a href="{{ config.base_url }}">Go to the index page</a>.</p>
<p>If you followed a link on this site, please <a href="https://github.com/phil-opp/blog_os/issues">report it</a>!</p>
{% endblock main %}

View File

@@ -6,7 +6,7 @@
{% block main %} {% block main %}
{% set posts_section = get_section(path = "first-edition/posts/_index.md") %} {% set posts_section = get_section(path = "first-edition/posts/_index.md") %}
{% set posts = posts_section.pages | reverse %} {% set posts = posts_section.pages %}
<div class="front-page-introduction"> <div class="front-page-introduction">
<p> <p>
This blog series creates a small operating system in the This blog series creates a small operating system in the
@@ -50,10 +50,11 @@
{% set extra = get_section(path = "first-edition/extra/_index.md") %} {% set extra = get_section(path = "first-edition/extra/_index.md") %}
<h1>{{ extra.title }}</h1> <h1>{{ extra.title }}</h1>
<ul> <ul>
{% for subsection in extra.subsections|reverse %} {% for subsection_path in extra.subsections %}
{% set subsection = get_section(path=subsection_path) %}
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li> <li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
{% endfor %} {% endfor %}
{% for page in extra.pages|reverse %} {% for page in extra.pages %}
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li> <li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@@ -34,11 +34,11 @@
{% block after_main %} {% block after_main %}
<hr> <hr>
<div class="PageNavigation"> <div class="PageNavigation">
{% if page.previous %} {% if page.lighter %}
<a class="prev" href="/{{ page.previous.path | safe }}">&laquo; {{ page.previous.title }}</a> <a class="prev" href="/{{ page.lighter.path | safe }}">&laquo; {{ page.lighter.title }}</a>
{% endif %} {% endif %}
{% if page.next %} {% if page.heavier %}
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} &raquo;</a> <a class="next" href="/{{ page.heavier.path | safe }}">{{ page.heavier.title }} &raquo;</a>
{% endif %} {% endif %}
</div> </div>

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %} {% block introduction %}{% endblock introduction %}
<div class="posts neutral"> <div class="posts neutral">
{% for page in section.pages|reverse %} {% for page in section.pages %}
{{ macros::post_link(page=page) }} {{ macros::post_link(page=page) }}
{% endfor %} {% endfor %}
</div> </div>

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %} {% block introduction %}{% endblock introduction %}
<div class="posts neutral"> <div class="posts neutral">
{% for page in section.pages|reverse %} {% for page in section.pages %}
<article> <article>
<h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2> <h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2>
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date"> <time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">

View File

@@ -3,7 +3,7 @@
<title>{{ config.title }}</title> <title>{{ config.title }}</title>
<link>{{ config.base_url | safe }}</link> <link>{{ config.base_url | safe }}</link>
<description>{{ config.description }}</description> <description>{{ config.description }}</description>
<generator>Gutenberg</generator> <generator>Zola</generator>
<language>{{ config.default_language }}</language> <language>{{ config.default_language }}</language>
<atom:link href="{{ feed_url | safe }}" rel="self" type="application/rss+xml"/> <atom:link href="{{ feed_url | safe }}" rel="self" type="application/rss+xml"/>
<lastBuildDate>{{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate> <lastBuildDate>{{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>

View File

@@ -9,7 +9,9 @@
<meta name="description" content="{{ config.description }}"> <meta name="description" content="{{ config.description }}">
<meta name="author" content="{{ config.extra.author.name }}"> <meta name="author" content="{{ config.extra.author.name }}">
<link rel="canonical" href="{{ current_url | safe }}" /> {% if current_url %}
<link rel="canonical" href="{{ current_url | safe }}" />
{% endif %}
<link href="/css/poole.css" rel="stylesheet"> <link href="/css/poole.css" rel="stylesheet">
<link href="/css/main.css" rel="stylesheet"> <link href="/css/main.css" rel="stylesheet">

View File

@@ -6,7 +6,7 @@
{% block main %} {% block main %}
{% set posts_section = get_section(path = "second-edition/posts/_index.md") %} {% set posts_section = get_section(path = "second-edition/posts/_index.md") %}
{% set posts = posts_section.pages | reverse %} {% set posts = posts_section.pages %}
<div class="front-page-introduction"> <div class="front-page-introduction">
<p> <p>
@@ -71,10 +71,10 @@
{% set extra = get_section(path = "second-edition/extra/_index.md") %} {% set extra = get_section(path = "second-edition/extra/_index.md") %}
<h1>{{ extra.title }}</h1> <h1>{{ extra.title }}</h1>
<ul> <ul>
{% for subsection in extra.subsections|reverse %} {% for subsection in extra.subsections %}
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li> <li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
{% endfor %} {% endfor %}
{% for page in extra.pages|reverse %} {% for page in extra.pages %}
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li> <li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@@ -34,11 +34,11 @@
{% block after_main %} {% block after_main %}
<hr> <hr>
<div class="PageNavigation"> <div class="PageNavigation">
{% if page.previous %} {% if page.lighter %}
<a class="prev" href="/{{ page.previous.path | safe }}">&laquo; {{ page.previous.title }}</a> <a class="prev" href="/{{ page.lighter.path | safe }}">&laquo; {{ page.lighter.title }}</a>
{% endif %} {% endif %}
{% if page.next %} {% if page.heavier %}
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} &raquo;</a> <a class="next" href="/{{ page.heavier.path | safe }}">{{ page.heavier.title }} &raquo;</a>
{% endif %} {% endif %}
</div> </div>

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %} {% block introduction %}{% endblock introduction %}
<div class="posts neutral"> <div class="posts neutral">
{% for page in section.pages|reverse %} {% for page in section.pages %}
{{ macros::post_link(page=page) }} {{ macros::post_link(page=page) }}
{% endfor %} {% endfor %}
</div> </div>

View File

@@ -1,16 +1,16 @@
[build] [build]
base = "blog" base = "blog"
publish = "blog/public" publish = "blog/public"
command = "python before_build.py && gutenberg build" command = "python before_build.py && curl -sL https://github.com/getzola/zola/releases/download/v0.5.1/zola-v0.5.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv && ./zola build"
[build.environment] [build.environment]
GUTENBERG_VERSION = "0.3.3" ZOLA_VERSION = "0.5.1"
[context.deploy-preview] [context.deploy-preview]
command = "python before_build.py && gutenberg build --base-url $DEPLOY_PRIME_URL" command = "python before_build.py && curl -sL https://github.com/getzola/zola/releases/download/v0.5.1/zola-v0.5.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv && ./zola build --base-url $DEPLOY_PRIME_URL"
[context.branch-deploy] [context.branch-deploy]
command = "python before_build.py && gutenberg build --base-url $DEPLOY_PRIME_URL" command = "python before_build.py && curl -sL https://github.com/getzola/zola/releases/download/v0.5.1/zola-v0.5.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv && ./zola build --base-url $DEPLOY_PRIME_URL"
[[redirects]] [[redirects]]