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

change how author is assigned, use site.author

parent 7bab27c6
No related branches found
No related tags found
No related merge requests found
<!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} --> <!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} -->
{% unless page.author %} {% assign author = site.data.authors.authors | where: "prefix", site.author | first %}
{% assign author = page.url | split: "/" %}
{% assign author = author[1] %}
{% endunless %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %}
<div itemscope itemtype="https://schema.org/Person"> <div itemscope itemtype="https://schema.org/Person">
......
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
{%- endif -%} {%- endif -%}
<!-- don't use page.author even if it is set, find author based on url --> <!-- don't use page.author even if it is set, find author based on url -->
{% assign author = page.url | split: "/" %} {% assign author = site.data.authors.authors | where: "prefix", site.author | first %}
{% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %}
{%- if author.twitter -%} {%- if author.twitter -%}
{%- assign author_twitter = author.twitter | replace: "@", "" -%} {%- assign author_twitter = author.twitter | replace: "@", "" -%}
......
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
layout: default layout: default
--- ---
{% unless page.author %} {% assign author = site.data.authors.authors | where: "prefix", site.author | first %}
{% assign author = page.url | split: "/" %}
{% assign author = author[1] %}
{% endunless %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %}
{% if page.has_header %} {% if page.has_header %}
{% include page__hero.html %} {% include page__hero.html %}
...@@ -19,6 +15,7 @@ layout: default ...@@ -19,6 +15,7 @@ layout: default
{% endif %} {% endif %}
<div id="main" role="main"> <div id="main" role="main">
coucou
{% include sidebar.html %} {% include sidebar.html %}
<article class="page" itemscope itemtype="https://schema.org/CreativeWork"> <article class="page" itemscope itemtype="https://schema.org/CreativeWork">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment