mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 13:21:35 +01:00
feat: replace extra.author with authors in the page front matter
This commit is contained in:
parent
c2a7f409f0
commit
5371faac79
2 changed files with 20 additions and 7 deletions
|
|
@ -17,8 +17,19 @@
|
||||||
{% set page_title = page.title | default(value=config.title) %}
|
{% set page_title = page.title | default(value=config.title) %}
|
||||||
<!---->
|
<!---->
|
||||||
{% set description = page.description | default(value=page_title) %}
|
{% set description = page.description | default(value=page_title) %}
|
||||||
|
<!---->
|
||||||
|
{% if page.authors | length > 0 %}
|
||||||
|
<!---->
|
||||||
|
{% set author = page.authors | join(sep=", ") %}
|
||||||
|
<!---->
|
||||||
|
{% else %}
|
||||||
|
<!---->
|
||||||
|
{% set author = config.author | default(value=config.title) %}
|
||||||
|
<!---->
|
||||||
|
{% endif %}
|
||||||
|
<!---->
|
||||||
<meta name="description" content="{{ description }}" />
|
<meta name="description" content="{{ description }}" />
|
||||||
<meta name="author" content="{{ page.extra.author | default(value=page_title) }}" />
|
<meta name="author" content="{{ author }}" />
|
||||||
<!-- The Open Graph protocol -->
|
<!-- The Open Graph protocol -->
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:title" content="{{ page_title }}" />
|
<meta property="og:title" content="{{ page_title }}" />
|
||||||
|
|
@ -109,8 +120,7 @@
|
||||||
title="Atom"
|
title="Atom"
|
||||||
href="{{ get_url(path=`atom.xml`) }}"
|
href="{{ get_url(path=`atom.xml`) }}"
|
||||||
/>
|
/>
|
||||||
{% endif %}
|
{% endif %} {% if "rss.xml" in config.feed_filenames %}
|
||||||
{% if "rss.xml" in config.feed_filenames %}
|
|
||||||
<link
|
<link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
type="application/rss+xml"
|
type="application/rss+xml"
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,13 @@
|
||||||
<span class="mx-1">·</span>
|
<span class="mx-1">·</span>
|
||||||
<span>{{ page.reading_time }}min</span>
|
<span>{{ page.reading_time }}min</span>
|
||||||
{% endif %}<!---->
|
{% endif %}<!---->
|
||||||
{% set single_author = page.extra.author | default(value=config.author) %}
|
{% if page.authors | length > 0 %}<!---->
|
||||||
<!---->
|
{% set author = page.authors | join(sep=", ") %}<!---->
|
||||||
{% if single_author %}
|
{% else %}<!---->
|
||||||
|
{% set author = config.author %}<!---->
|
||||||
|
{% endif %}<!---->
|
||||||
|
{% if author %}
|
||||||
<span class="mx-1">·</span>
|
<span class="mx-1">·</span>
|
||||||
<span>{{ single_author }}</span>
|
<span>{{ author }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue