Upgrade to zola 0.14.1

This commit is contained in:
Philipp Oppermann
2021-10-17 21:06:57 +02:00
parent 5c750985a6
commit 44f51402f7
9 changed files with 65 additions and 46 deletions

View File

@@ -1,24 +1,17 @@
title = "Writing an OS in Rust"
base_url = "https://os.phil-opp.com"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
highlight_code = true
highlight_theme = "visual-studio-dark"
generate_feed = true
feed_filename = "rss.xml"
compile_sass = true
languages = [
{ code = "zh-CN" }, # Chinese (simplified)
{ code = "zh-TW" }, # Chinese (traditional)
{ code = "ja" }, # Japanese
{ code = "fa" }, # Persian
{ code = "ru" }, # Russian
{ code = "fr" }, # French
]
minify_html = true
ignored_content = ["*/README.md"]
[markdown]
highlight_code = true
highlight_theme = "visual-studio-dark"
smart_punctuation = true
[link_checker]
skip_prefixes = [
"https://crates.io/crates", # see https://github.com/rust-lang/crates.io/issues/788
@@ -36,9 +29,14 @@ skip_anchor_prefixes = [
[extra]
subtitle = "Philipp Oppermann's blog"
author = { name = "Philipp Oppermann" }
default_language = "en"
languages = ["en", "zh-CN", "zh-TW", "fr", "ja", "fa", "ru"]
[translations.en]
lang_name = "English"
[languages.en]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.en.translations]
lang_name = "English (original)"
toc = "Table of Contents"
all_posts = "« All Posts"
comments = "Comments"
@@ -50,7 +48,11 @@ translated_content_notice = "This is a community translation of the <strong><a h
translated_by = "Translation by"
word_separator = "and"
[translations.zh-CN]
# Chinese (simplified)
[languages.zh-CN]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.zh-CN.translations]
lang_name = "Chinese (simplified)"
toc = "目录"
all_posts = "« 所有文章"
@@ -63,7 +65,11 @@ translated_content_notice = "这是对原文章 <strong><a href=\"_original.perm
translated_by = "翻译者:"
word_separator = "和"
[translations.zh-TW]
# Chinese (traditional)
[languages.zh-TW]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.zh-TW.translations]
lang_name = "Chinese (traditional)"
toc = "目錄"
all_posts = "« 所有文章"
@@ -76,7 +82,11 @@ translated_content_notice = "這是對原文章 <strong><a href=\"_original.perm
translated_by = "翻譯者:"
word_separator = "和"
[translations.ja]
# Japanese
[languages.ja]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.ja.translations]
lang_name = "Japanese"
toc = "目次"
all_posts = "« すべての記事へ"
@@ -89,7 +99,11 @@ translated_content_notice = "この記事は<strong><a href=\"_original.permalin
translated_by = "翻訳者:"
word_separator = "及び"
[translations.fa]
# Persian
[languages.fa]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.fa.translations]
lang_name = "Persian"
toc = "فهرست مطالب"
all_posts = "« همه پست‌ها"
@@ -102,7 +116,11 @@ translated_content_notice = "این یک ترجمه از جامعه کاربرا
translated_by = "ترجمه توسط"
word_separator = "و"
[translations.ru]
# Russian
[languages.ru]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.ru.translations]
lang_name = "Russian"
toc = "Содержание"
all_posts = Все посты"
@@ -115,7 +133,11 @@ translated_content_notice = "Это перевод сообщества пост
translated_by = "Перевод сделан"
word_separator = "и"
[translations.fr]
# French
[languages.fr]
title = "Writing an OS in Rust"
description = "This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code."
[languages.fr.translations]
lang_name = "French"
toc = "Table des matières"
all_posts = "« Tous les articles"

View File

@@ -144,7 +144,7 @@ EXCEPTION: BREAKPOINT at 0x110970
So let's disassemble the instruction at `0x110970` and its predecessor:
```shell
```bash
> objdump -d build/kernel-x86_64.bin | grep -B1 "110970:"
11096f: cc int3
110970: 48 c7 01 2a 00 00 00 movq $0x2a,(%rcx)

View File

@@ -675,7 +675,7 @@ I created the [linked_list_allocator] crate to handle all of these cases. It con
We need to add the extern crate to our `Cargo.toml` and our `lib.rs`:
``` shell
``` bash
> cargo add linked_list_allocator
```

View File

@@ -377,7 +377,6 @@ tbody tr:nth-child(odd) th {
/* Blog post or page title */
.page-title,
.post-title,
.post-title a {
color: var(--post-title-color);
}

View File

@@ -70,16 +70,14 @@
<aside class="page-aside-right">
<div class="block" id="language-selector">
<h2>Other Languages</h2>
<ul>{%- for lang_code in config.languages | map(attribute="code") | concat(with="en") | sort -%}
{%- if lang_code != lang -%}
<li data-lang-switch-to="{{ lang_code }}" class="">
{%- if lang_code == "en" -%}
<a href="/">English (original)</a>
{%- else -%}
<a href="/{{ lang_code }}">{{ trans(key="lang_name", lang = lang_code) }}</a>
{%- endif -%}
</li>
{%- endif %}
{% set translations = section.translations | group_by(attribute="lang") %}
<ul>{%- for lang_code in config.extra.languages -%}
{%- set translation = translations[lang_code].0 -%}
{%- if translation and lang_code != lang -%}
<li data-lang-switch-to="{{ translation.lang }}" class=""><a href="{{ translation.permalink | safe }}">
{{ trans(key="lang_name", lang = translation.lang) }}
</a></li>
{%- endif -%}
{% endfor %}</ul>
</div>
<div class="block">

View File

@@ -17,7 +17,7 @@
{{ post.summary | safe }}
<a class="read-more" href="{{ post.path | safe }}"><em>{{ trans(key="readmore", lang=lang) | safe }}</em></a>
{%- if lang and not_translated and lang != config.default_language -%}
{%- if lang and not_translated and lang != config.extra.default_language -%}
<aside class="no-translation">
{{ trans(key="not_translated", lang=lang) }}
</aside>

View File

@@ -119,15 +119,15 @@
{% if page.translations -%}
<div class="block" id="language-selector">
<h2>Other Languages</h2>
<ul>{%- for translation in page.translations | sort(attribute="lang") %}
<li data-lang-switch-to="{{ translation.lang }}" class=""><a href="{{ translation.permalink | safe }}">
{%- if translation.lang == "en" -%}
English (original)
{%- else -%}
{% set translations = page.translations | group_by(attribute="lang") %}
<ul>{%- for lang_code in config.extra.languages -%}{%- if translations[lang_code] -%}
{%- set translation = translations[lang_code] | first -%}
{%- if translation and lang_code != lang -%}
<li data-lang-switch-to="{{ translation.lang }}" class=""><a href="{{ translation.permalink | safe }}">
{{ trans(key="lang_name", lang = translation.lang) }}
{%- endif -%}
</a></li>
{% endfor %}</ul>
</a></li>
{%- endif -%}
{%- endif -%}{% endfor %}</ul>
</div>
{%- endif %}

View File

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