Add support for author in YAML parameters (#1220)
This commit is contained in:
parent
a206f70d11
commit
6c5187d786
7 changed files with 30 additions and 9 deletions
|
|
@ -1,8 +1,8 @@
|
|||
## Unreleased version
|
||||
|
||||
- BREAKING CHANGE: Allow changing the order of the social network links that appear in the footer (#1152)
|
||||
- BREAKING CHANGE: `google-scholar` social network link no longer requires the prefix `citations?user=`; if you previously set this parameter, it needs to be updated (#1189)
|
||||
- Fixed bug where hovering over search results showed the text "{desc}" (#1156)
|
||||
- BREAKING CHANGE: `google-scholar` social network link no longer requires the prefix `citations?user=`; if you previously set this parameter, it needs to be updated (#1189)
|
||||
- Added `author` YAML parameter to allow specifying the author(s) of a post (#1220)
|
||||
- Fixed bug where hovering over search results showed the text "{desc}" (#1156)
|
||||
- Added social network links for GitLab, Bluesky (#1168, #1218)
|
||||
- Added instructions and example on how to fix image links in project sites (#1171)
|
||||
- Pagination buttons: use nicer arrows, and don't show text on small screens (#1221)
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ These are parameters that you may not use often, but can come in handy sometimes
|
|||
|
||||
Parameter | Description
|
||||
----------- | -----------
|
||||
author | Specify the author of a blog post (useful if a website has multiple authors).
|
||||
readtime | If you want a post to show how many minutes it will take to read it, use `readtime: true`.
|
||||
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`.
|
||||
social-share | By default, every blog post has buttons to share the page on social media. If you want to turn this feature off, use `social-share: false`.
|
||||
|
|
|
|||
|
|
@ -25,8 +25,15 @@
|
|||
|
||||
<title>{{ title }}</title>
|
||||
|
||||
{% if site.author %}
|
||||
<meta name="author" content="{{ site.author }}">
|
||||
{% capture author %}
|
||||
{%- if page.author -%}
|
||||
{{ page.author | strip_html }}
|
||||
{%- elsif site.author -%}
|
||||
{{ site.author }}
|
||||
{%- endif -%}
|
||||
{% endcapture %}
|
||||
{% if author != "" %}
|
||||
<meta name="author" content="{{ author }}">
|
||||
{% endif %}
|
||||
|
||||
<meta name="description" content="{{ description }}">
|
||||
|
|
@ -112,7 +119,9 @@
|
|||
|
||||
{% if page.id %}
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:article:author" content="{{ site.author }}">
|
||||
{% if author != "" %}
|
||||
<meta property="og:article:author" content="{{ author }}">
|
||||
{% endif %}
|
||||
<meta property="og:article:published_time" content="{{ page.date | date_to_xmlschema }}">
|
||||
<meta property="og:url" content="{{ page.url | absolute_url }}">
|
||||
<link rel="canonical" href="{{ page.url | absolute_url }}">
|
||||
|
|
|
|||
|
|
@ -36,8 +36,11 @@
|
|||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.type == "post" %}
|
||||
|
||||
{% if include.type == "post" %}
|
||||
{% if page.author %}
|
||||
By <strong>{{ page.author | strip_html }}</strong><br>
|
||||
{% endif%}
|
||||
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
|
||||
{% if page.last-updated %}
|
||||
<span class="post-meta">
|
||||
|
|
@ -71,7 +74,10 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.type == "post" %}
|
||||
{% if include.type == "post" %}
|
||||
{% if page.author %}
|
||||
By <strong>{{ page.author | strip_html }}</strong><br>
|
||||
{% endif%}
|
||||
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
|
||||
{% if page.last-updated %}
|
||||
<span class="post-meta">
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ layout: page
|
|||
{% endif %}
|
||||
</a>
|
||||
|
||||
{% if post.author %}
|
||||
<span>By <strong>{{ post.author | strip_html }}</strong></span>
|
||||
{% endif %}
|
||||
<p class="post-meta">
|
||||
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
|
||||
Posted on {{ post.date | date: date_format }}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ cover-img: /assets/img/path.jpg
|
|||
thumbnail-img: /assets/img/thumb.png
|
||||
share-img: /assets/img/path.jpg
|
||||
tags: [books, test]
|
||||
author: Sharon Smith and Barry Simpson
|
||||
---
|
||||
|
||||
Under what circumstances should we step off a path? When is it essential that we finish what we start? If I bought a bag of peanuts and had an allergic reaction, no one would fault me if I threw it out. If I ended a relationship with a woman who hit me, no one would say that I had a commitment problem. But if I walk away from a seemingly secure route because my soul has other ideas, I am a flake?
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ gh-repo: daattali/beautiful-jekyll
|
|||
gh-badge: [star, fork, follow]
|
||||
tags: [test]
|
||||
comments: true
|
||||
author: Bill Smith
|
||||
---
|
||||
|
||||
{: .box-success}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue