Make chapters sections to avoid rendering them

Instead of redirecting the chapter pages to a 404 site.
This commit is contained in:
Philipp Oppermann
2021-01-07 20:07:43 +01:00
parent 2e52b681ec
commit ec1f80416b
5 changed files with 5 additions and 12 deletions

View File

@@ -42,10 +42,10 @@
{% set chapter_slug = chapter | slugify %}
<div class="posts {{chapter_slug}}">
{% set chapter_page = get_page(path = "edition-3/chapters/" ~ chapter_slug ~ ".md" ) %}
<h2>{{ chapter_page.title }}</h2>
{% set chapter_section = get_section(path = "edition-3/chapters/" ~ chapter_slug ~ "/_index.md" ) %}
<h2>{{ chapter_section.title }}</h2>
<div class="chapter-introduction">
{{ chapter_page.content | safe }}
{{ chapter_section.content | safe }}
</div>
<ul>

View File

@@ -1,7 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ config.base_url | safe }}/404" />
</head>
</html>