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

@@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: 'Download Zola' - name: 'Download Zola'
run: curl -sL https://github.com/getzola/zola/releases/download/v0.12.1/zola-v0.12.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv run: curl -sL https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv
- name: 'Install Python Libraries' - name: 'Install Python Libraries'
run: python -m pip install --user -r requirements.txt run: python -m pip install --user -r requirements.txt
working-directory: "blog" working-directory: "blog"
@@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: 'Download Zola' - name: 'Download Zola'
run: curl -sL https://github.com/getzola/zola/releases/download/v0.12.1/zola-v0.12.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv run: curl -sL https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv
- name: "Run zola check" - name: "Run zola check"
run: ../zola check run: ../zola check

View File

@@ -1,24 +1,17 @@
title = "Writing an OS in Rust"
base_url = "https://os.phil-opp.com" 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 generate_feed = true
feed_filename = "rss.xml" feed_filename = "rss.xml"
compile_sass = true compile_sass = true
minify_html = true
languages = [
{ code = "zh-CN" }, # Chinese (simplified)
{ code = "zh-TW" }, # Chinese (traditional)
{ code = "ja" }, # Japanese
{ code = "fa" }, # Persian
{ code = "ru" }, # Russian
{ code = "fr" }, # French
]
ignored_content = ["*/README.md"] ignored_content = ["*/README.md"]
[markdown]
highlight_code = true
highlight_theme = "visual-studio-dark"
smart_punctuation = true
[link_checker] [link_checker]
skip_prefixes = [ skip_prefixes = [
"https://crates.io/crates", # see https://github.com/rust-lang/crates.io/issues/788 "https://crates.io/crates", # see https://github.com/rust-lang/crates.io/issues/788
@@ -36,9 +29,14 @@ skip_anchor_prefixes = [
[extra] [extra]
subtitle = "Philipp Oppermann's blog" subtitle = "Philipp Oppermann's blog"
author = { name = "Philipp Oppermann" } author = { name = "Philipp Oppermann" }
default_language = "en"
languages = ["en", "zh-CN", "zh-TW", "fr", "ja", "fa", "ru"]
[translations.en] [languages.en]
lang_name = "English" 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" toc = "Table of Contents"
all_posts = "« All Posts" all_posts = "« All Posts"
comments = "Comments" comments = "Comments"
@@ -50,7 +48,11 @@ translated_content_notice = "This is a community translation of the <strong><a h
translated_by = "Translation by" translated_by = "Translation by"
word_separator = "and" 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)" lang_name = "Chinese (simplified)"
toc = "目录" toc = "目录"
all_posts = "« 所有文章" all_posts = "« 所有文章"
@@ -63,7 +65,11 @@ translated_content_notice = "这是对原文章 <strong><a href=\"_original.perm
translated_by = "翻译者:" translated_by = "翻译者:"
word_separator = "和" 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)" lang_name = "Chinese (traditional)"
toc = "目錄" toc = "目錄"
all_posts = "« 所有文章" all_posts = "« 所有文章"
@@ -76,7 +82,11 @@ translated_content_notice = "這是對原文章 <strong><a href=\"_original.perm
translated_by = "翻譯者:" translated_by = "翻譯者:"
word_separator = "和" 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" lang_name = "Japanese"
toc = "目次" toc = "目次"
all_posts = "« すべての記事へ" all_posts = "« すべての記事へ"
@@ -89,7 +99,11 @@ translated_content_notice = "この記事は<strong><a href=\"_original.permalin
translated_by = "翻訳者:" translated_by = "翻訳者:"
word_separator = "及び" 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" lang_name = "Persian"
toc = "فهرست مطالب" toc = "فهرست مطالب"
all_posts = "« همه پست‌ها" all_posts = "« همه پست‌ها"
@@ -102,7 +116,11 @@ translated_content_notice = "این یک ترجمه از جامعه کاربرا
translated_by = "ترجمه توسط" translated_by = "ترجمه توسط"
word_separator = "و" 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" lang_name = "Russian"
toc = "Содержание" toc = "Содержание"
all_posts = Все посты" all_posts = Все посты"
@@ -115,7 +133,11 @@ translated_content_notice = "Это перевод сообщества пост
translated_by = "Перевод сделан" translated_by = "Перевод сделан"
word_separator = "и" 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" lang_name = "French"
toc = "Table des matières" toc = "Table des matières"
all_posts = "« Tous les articles" 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: So let's disassemble the instruction at `0x110970` and its predecessor:
```shell ```bash
> objdump -d build/kernel-x86_64.bin | grep -B1 "110970:" > objdump -d build/kernel-x86_64.bin | grep -B1 "110970:"
11096f: cc int3 11096f: cc int3
110970: 48 c7 01 2a 00 00 00 movq $0x2a,(%rcx) 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`: We need to add the extern crate to our `Cargo.toml` and our `lib.rs`:
``` shell ``` bash
> cargo add linked_list_allocator > cargo add linked_list_allocator
``` ```

View File

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

View File

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

View File

@@ -17,7 +17,7 @@
{{ post.summary | safe }} {{ post.summary | safe }}
<a class="read-more" href="{{ post.path | safe }}"><em>{{ trans(key="readmore", lang=lang) | safe }}</em></a> <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"> <aside class="no-translation">
{{ trans(key="not_translated", lang=lang) }} {{ trans(key="not_translated", lang=lang) }}
</aside> </aside>

View File

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

View File

@@ -4,7 +4,7 @@
<link>{{ config.base_url | safe }}</link> <link>{{ config.base_url | safe }}</link>
<description>{{ config.description }}</description> <description>{{ config.description }}</description>
<generator>Zola</generator> <generator>Zola</generator>
<language>{{ config.default_language }}</language> <language>{{ lang }}</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_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate> <lastBuildDate>{{ last_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
{% for page in pages %} {% for page in pages %}