Move introduction from index template to markdown file

To allow translations.
This commit is contained in:
Philipp Oppermann
2021-01-02 18:09:47 +01:00
parent aa227c7dc6
commit 5a86a715c9
2 changed files with 14 additions and 14 deletions

View File

@@ -1,3 +1,13 @@
+++ +++
template = "edition-2/index.html" template = "edition-2/index.html"
+++ +++
<h1 style="visibility: hidden; height: 0px; margin: 0px; padding: 0px;">Writing an OS in Rust</h1>
<div class="front-page-introduction">
This blog series creates a small operating system in the [Rust programming language](https://www.rust-lang.org/). 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 [Github repository](https://github.com/phil-opp/blog_os).
Latest post: <!-- latest-post -->
</div>

View File

@@ -9,20 +9,10 @@
{% set posts_section = get_section(path = "edition-2/posts/_index.md") %} {% set posts_section = get_section(path = "edition-2/posts/_index.md") %}
{% set posts = posts_section.pages %} {% set posts = posts_section.pages %}
<h1 style="visibility: hidden; height: 0px; margin: 0px; padding: 0px;">Writing an OS in Rust</h1> {{ section.content
| replace(from="<!-- latest-post -->", to=macros::latest_post(posts=posts))
<div class="front-page-introduction"> | safe
<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> <div>
{%- set chapter = "none" -%} {%- set chapter = "none" -%}