Skip to content
Snippets Groups Projects
Unverified Commit b745d2d7 authored by kogeletey's avatar kogeletey
Browse files

root: config.toml new settings `show_word_count` and `show_reading_time`...

root: config.toml new settings `show_word_count` and `show_reading_time` allowing you to show the number of words and the time of reading it on the page, respectively. templates: page add implementation previos paragraph settings.
sass: improved indents
parent e34c5913
No related branches found
No related tags found
Loading
...@@ -27,6 +27,8 @@ render_emoji = true ...@@ -27,6 +27,8 @@ render_emoji = true
version = "https://api.github.com/repos/kogeletey/karzok/releases/latest" version = "https://api.github.com/repos/kogeletey/karzok/releases/latest"
cdnurl = "https://get.re128.net/" cdnurl = "https://get.re128.net/"
show_word_count = true
show_reading_time = true
[[extra.header]] [[extra.header]]
text = "Meta" text = "Meta"
......
...@@ -103,7 +103,12 @@ ...@@ -103,7 +103,12 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
li { li {
display: flex;
list-style: none; list-style: none;
padding-left: 1em; padding-right: 1em;
}
&-author {
padding-right: 0;
padding-left: 0.5em;
} }
} }
...@@ -10,12 +10,21 @@ ...@@ -10,12 +10,21 @@
<h1 class="page-title"> {{ page.title }} </h1> <h1 class="page-title"> {{ page.title }} </h1>
{% block sections %} {% block sections %}
<ul class="sections"> <ul class="sections">
{% if config.extra.render_path %}
<li> <a href="{{ page.permalink }}">/{{ page.relative_path | trim_end_matches(pat=".md") }}</a></li>
{% endif %}
{% if config.extra.show_word_count %}
<li> <span> {{ page.word_count }} words </span></li>
{% endif %}
{% if config.extra.show_reading_time %}
<li> <span> {{ page.reading_time}} minutes to read </span></li>
{% endif %}
{% if page.taxonomies.authors %} {% if page.taxonomies.authors %}
<span> Authors: </span> <span> Authors: </span>
{% for author in page.taxonomies.authors %} {% for author in page.taxonomies.authors %}
<li> <li>
<!-- <a href="{{ get_taxonomy_url(kind="authors",name=author) | safe }}"> --> <!-- <a href="{{ get_taxonomy_url(kind="authors",name=author) | safe }}"> -->
<span>{{ author }}</span> <span class="sections-author">{{ author }}</span>
<!-- </a> --> <!-- </a> -->
</li> </li>
{% endfor %} {% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment