mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Upgrade to zola 0.14.1
This commit is contained in:
4
.github/workflows/blog.yml
vendored
4
.github/workflows/blog.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- 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'
|
||||
run: python -m pip install --user -r requirements.txt
|
||||
working-directory: "blog"
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- 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"
|
||||
run: ../zola check
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
{% 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 -%}
|
||||
</li>
|
||||
{%- endif %}
|
||||
{% endfor %}</ul>
|
||||
</div>
|
||||
<div class="block">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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") %}
|
||||
{% 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 }}">
|
||||
{%- if translation.lang == "en" -%}
|
||||
English (original)
|
||||
{%- else -%}
|
||||
{{ trans(key="lang_name", lang = translation.lang) }}
|
||||
{%- endif -%}
|
||||
</a></li>
|
||||
{% endfor %}</ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}{% endfor %}</ul>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user