Add configuration to have post series for things like quickfacts and upcoming reversi
All checks were successful
Build Docker Image / docker (push) Successful in 19s
All checks were successful
Build Docker Image / docker (push) Successful in 19s
This commit is contained in:
@@ -7,9 +7,11 @@ draft = true
|
|||||||
[taxonomies]
|
[taxonomies]
|
||||||
categories = ["Programming"]
|
categories = ["Programming"]
|
||||||
tags = ["Factorio", "Rust"]
|
tags = ["Factorio", "Rust"]
|
||||||
|
series = ["quickfacts"]
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
toc = true
|
toc = true
|
||||||
|
series_order = 3
|
||||||
+++
|
+++
|
||||||
|
|
||||||
The first real entry in my series about my quickfacts project.
|
The first real entry in my series about my quickfacts project.
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ draft = true
|
|||||||
[taxonomies]
|
[taxonomies]
|
||||||
categories = ["Programming"]
|
categories = ["Programming"]
|
||||||
tags = ["Factorio", "Rust"]
|
tags = ["Factorio", "Rust"]
|
||||||
|
series = ["quickfacts"]
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
toc = true
|
toc = true
|
||||||
|
series_order = 2
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ draft = true
|
|||||||
[taxonomies]
|
[taxonomies]
|
||||||
categories = ["Programming"]
|
categories = ["Programming"]
|
||||||
tags = ["Factorio", "Rust", "Quickfacts"]
|
tags = ["Factorio", "Rust", "Quickfacts"]
|
||||||
|
series = ["quickfacts"]
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
toc = true
|
toc = true
|
||||||
|
series_order = 1
|
||||||
+++
|
+++
|
||||||
|
|
||||||
A small introduction to my ongoing quickfacts project.
|
A small introduction to my ongoing quickfacts project.
|
||||||
|
|||||||
@@ -13,6 +13,14 @@
|
|||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
{% if page.date %}Published: {{ page.date | date(format="%F") }}{% endif %}
|
{% if page.date %}Published: {{ page.date | date(format="%F") }}{% endif %}
|
||||||
|
|
||||||
|
{% if page.taxonomies.series %}
|
||||||
|
<br>
|
||||||
|
{% set series_name = page.taxonomies.series | first %}
|
||||||
|
{% set series_term = get_taxonomy_term(kind="series", term=series_name) %}
|
||||||
|
|
||||||
|
Part {{ page.extra.series_order }} of the <a href="{{ series_term.permalink }}">{{ series_name }}</a> series
|
||||||
|
{% endif %}
|
||||||
{% endmacro meta %}
|
{% endmacro meta %}
|
||||||
|
|
||||||
{% macro page_in_list(page) %}
|
{% macro page_in_list(page) %}
|
||||||
|
|||||||
20
templates/page.html
Normal file
20
templates/page.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{% extends "radion/templates/page.html" %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
{{ super() }}
|
||||||
|
|
||||||
|
{% if page.taxonomies.series %}
|
||||||
|
{% set series_name = page.taxonomies.series | first %}
|
||||||
|
{% set series_term = get_taxonomy_term(kind="series", term=series_name) %}
|
||||||
|
|
||||||
|
<div class="series">
|
||||||
|
<a href="{{ series_term.permalink }}">
|
||||||
|
Series: {{ series_term.name }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{% if page.extra.series_order %}
|
||||||
|
<span> · Part {{ page.extra.series_order }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock header %}
|
||||||
29
templates/series/list.html
Normal file
29
templates/series/list.html
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{% extends "index.html" %}
|
||||||
|
|
||||||
|
{% block title %}Browse Series{% endblock title %}
|
||||||
|
{% block og_title %}Browse Series{% endblock og_title %}
|
||||||
|
{% block twitter_title %}Browse Series{% endblock twitter_title %}
|
||||||
|
|
||||||
|
{% block meta_description %}
|
||||||
|
<meta name="description" content="Discover articles organized by series in this site index." />
|
||||||
|
<meta property="og:description" content="Discover articles organized by series in this site index." />
|
||||||
|
<meta property="twitter:description" content="Discover articles organized by series in this site index." />
|
||||||
|
{% endblock meta_description %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% block header %}
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock header %}
|
||||||
|
|
||||||
|
<h1>Series</h1>
|
||||||
|
|
||||||
|
{% if terms %}
|
||||||
|
<ul>
|
||||||
|
{% for term in terms %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ term.permalink | safe }}">{{ term.name }}</a>({{ term.pages | length }})
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock content %}
|
||||||
23
templates/series/single.html
Normal file
23
templates/series/single.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{% extends "index.html" %}
|
||||||
|
|
||||||
|
{% block title %}Posts in "{{ term.name }}"{% endblock title %}
|
||||||
|
{% block og_title %}Posts in "{{ term.name }}"{% endblock og_title %}
|
||||||
|
{% block twitter_title %}Posts in "{{ term.name }}"{% endblock twitter_title %}
|
||||||
|
|
||||||
|
{% block meta_description %}
|
||||||
|
<meta name="description" content="Discover articles from the '{{ term.name }}' series in this site index." />
|
||||||
|
<meta property="og:description" content="Discover articles from the '{{ term.name }}' series in this site index." />
|
||||||
|
<meta property="twitter:description" content="Discover articles from the '{{ term.name }}' series in this site index." />
|
||||||
|
{% endblock meta_description %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% block header %}
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock header %}
|
||||||
|
|
||||||
|
<h1>{{ term.name }} - Series</h1>
|
||||||
|
|
||||||
|
{% for page in term.pages %}
|
||||||
|
{{ post_macros::page_in_list(page=page) }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock content %}
|
||||||
@@ -13,6 +13,7 @@ taxonomies = [
|
|||||||
# You can enable/disable RSS
|
# You can enable/disable RSS
|
||||||
{ name = "categories", feed = true },
|
{ name = "categories", feed = true },
|
||||||
{ name = "tags", feed = true },
|
{ name = "tags", feed = true },
|
||||||
|
{ name = "series", feed = true },
|
||||||
]
|
]
|
||||||
|
|
||||||
author = "Leon"
|
author = "Leon"
|
||||||
@@ -37,6 +38,7 @@ taxonomies = [
|
|||||||
# You can enable/disable RSS
|
# You can enable/disable RSS
|
||||||
{ name = "categories", feed = true },
|
{ name = "categories", feed = true },
|
||||||
{ name = "tags", feed = true },
|
{ name = "tags", feed = true },
|
||||||
|
{ name = "series", feed = true },
|
||||||
]
|
]
|
||||||
|
|
||||||
radion_title = "Leon's Personal Blog"
|
radion_title = "Leon's Personal Blog"
|
||||||
@@ -44,6 +46,7 @@ radion_menu = [
|
|||||||
{ url = "$BASE_URL", name = "Home" },
|
{ url = "$BASE_URL", name = "Home" },
|
||||||
{ url = "$BASE_URL/categories", name = "Categories" },
|
{ url = "$BASE_URL/categories", name = "Categories" },
|
||||||
{ url = "$BASE_URL/tags", name = "Tags" },
|
{ url = "$BASE_URL/tags", name = "Tags" },
|
||||||
|
{ url = "$BASE_URL/series", name = "Series" },
|
||||||
]
|
]
|
||||||
theme = "toggle" # options: {light, dark, auto, toggle}
|
theme = "toggle" # options: {light, dark, auto, toggle}
|
||||||
toc = true
|
toc = true
|
||||||
|
|||||||
Reference in New Issue
Block a user