Skip to content
Snippets Groups Projects
Commit 67e82b50 authored by Eloi Perdereau's avatar Eloi Perdereau
Browse files

allow author override in front matter

parent 28d755f6
Branches
No related tags found
1 merge request!5Big fat update, mostly cms configuration
<!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} -->
{% unless page.author %}
{% assign author = page.url | split: "/" %}
{% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %}
{% endunless %}
{% assign author = site.data.authors.authors | where: "directory", author | first %}
<div itemscope itemtype="https://schema.org/Person">
......
......@@ -25,6 +25,7 @@
{%- assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once -%}
{%- endif -%}
<!-- don't use page.author even if it is set, find author based on url -->
{% assign author = page.url | split: "/" %}
{% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %}
......
......@@ -2,9 +2,11 @@
layout: default
---
{% unless page.author %}
{% assign author = page.url | split: "/" %}
{% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %}
{% endunless %}
{% assign author = site.data.authors.authors | where: "directory", author | first %}
{% if page.has_header %}
{% include page__hero.html %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment