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

authors config: change 'prefix' to 'directory'

parent e15f59eb
No related branches found
No related tags found
1 merge request!5Big fat update, mostly cms configuration
# /_data/authors.yml # /_data/authors.yml
authors: authors:
- name : "Centre Culturel de Luminy" - name : "Centre Culturel de Luminy"
prefix : "ccl" directory : "ccl"
avatar : /assets/images/authors-logo/indien-petit.png avatar : /assets/images/authors-logo/indien-petit.png
og_image : /assets/images/logo-ccl-grand.png og_image : /assets/images/logo-ccl-grand.png
banner : /assets/images/banniere-ccl-intime.png banner : /assets/images/banniere-ccl-intime.png
...@@ -12,7 +12,7 @@ authors: ...@@ -12,7 +12,7 @@ authors:
helloasso : "centre-culturel-de-luminy" helloasso : "centre-culturel-de-luminy"
- name : "Jardin Universitaire" - name : "Jardin Universitaire"
prefix : "jardin" directory : "jardin"
avatar : /assets/images/authors-logo/logo-jardin.png avatar : /assets/images/authors-logo/logo-jardin.png
banner : /assets/images/banniere-jardin.jpg banner : /assets/images/banniere-jardin.jpg
bio : "Jardin partagé chaleureux et ouvert à tous ! " bio : "Jardin partagé chaleureux et ouvert à tous ! "
...@@ -23,7 +23,7 @@ authors: ...@@ -23,7 +23,7 @@ authors:
links: links:
- name : "Club de Science Luminy" - name : "Club de Science Luminy"
prefix : "club-science" directory : "club-science"
avatar : /assets/images/authors-logo/logo-club-sciences.jpeg avatar : /assets/images/authors-logo/logo-club-sciences.jpeg
bio : "Organisation de conférences, de cours d'histoire et de philosophie des sciences" bio : "Organisation de conférences, de cours d'histoire et de philosophie des sciences"
location : "Luminy" location : "Luminy"
...@@ -31,7 +31,7 @@ authors: ...@@ -31,7 +31,7 @@ authors:
facebook : "Club-de-Science-Luminy-114357542612098/" facebook : "Club-de-Science-Luminy-114357542612098/"
- name : "FSE Luminy" - name : "FSE Luminy"
prefix : "fse" directory : "fse"
avatar : /assets/images/authors-logo/fse-transparent.png avatar : /assets/images/authors-logo/fse-transparent.png
bio : "INFORMER les étudiants, DÉFENDRE leurs droits, et créer la SOLIDARITÉ sur nos campus !" bio : "INFORMER les étudiants, DÉFENDRE leurs droits, et créer la SOLIDARITÉ sur nos campus !"
location : "Cité U & Hexagone" location : "Cité U & Hexagone"
...@@ -39,7 +39,7 @@ authors: ...@@ -39,7 +39,7 @@ authors:
facebook : "https://www.facebook.com/FSE.Luminy/" facebook : "https://www.facebook.com/FSE.Luminy/"
- name : "Café des Langues" - name : "Café des Langues"
prefix : "cafe-des-langues" directory : "cafe-des-langues"
avatar : /assets/images/authors-logo/cafe-des-langues.png avatar : /assets/images/authors-logo/cafe-des-langues.png
bio : "Venez converser autour d’un bon café et dans une ambiance très conviviale !" bio : "Venez converser autour d’un bon café et dans une ambiance très conviviale !"
location : "Bibliothèque U." location : "Bibliothèque U."
...@@ -49,7 +49,7 @@ authors: ...@@ -49,7 +49,7 @@ authors:
twitter : "Cafe_Langues" twitter : "Cafe_Langues"
- name : "ALLIÉ" - name : "ALLIÉ"
prefix : "allie" directory : "allie"
avatar : /assets/images/authors-logo/allie.png avatar : /assets/images/authors-logo/allie.png
bio : "Association Luminyenne de Lutte et d'Information des Etudiants, est basée à Marseille" bio : "Association Luminyenne de Lutte et d'Information des Etudiants, est basée à Marseille"
location : "Hexagone" location : "Hexagone"
......
<!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} --> <!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} -->
{% assign author = page.url | split: "/" %} {% assign author = page.url | split: "/" %}
{% assign author = author[1] %} {% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %} {% assign author = site.data.authors.authors | where: "directory", author | first %}
<div itemscope itemtype="https://schema.org/Person"> <div itemscope itemtype="https://schema.org/Person">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<ul> <ul>
{% for author in site.data.authors.authors %} {% for author in site.data.authors.authors %}
<li> <li>
<a href="/{{ author.prefix }}/">{{ author.name }}</a> <a href="/{{ author.directory }}/">{{ author.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</div> </div>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
{% assign author = page.url | split: "/" %} {% assign author = page.url | split: "/" %}
{% assign author = author[1] %} {% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %} {% assign author = site.data.authors.authors | where: "directory", author | first %}
{%- if author.twitter -%} {%- if author.twitter -%}
{%- assign author_twitter = author.twitter | replace: "@", "" -%} {%- assign author_twitter = author.twitter | replace: "@", "" -%}
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
{% if s.nav %}{% include nav_list nav=s.nav %}{% endif %} {% if s.nav %}{% include nav_list nav=s.nav %}{% endif %}
{% endfor %} {% endfor %}
{% if page.sidebar.nav %} {% if page.sidebar.nav %}
{% include nav_list nav=author.prefix %} {% include nav_list nav=author.directory %}
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
......
...@@ -4,7 +4,7 @@ layout: default ...@@ -4,7 +4,7 @@ layout: default
{% assign author = page.url | split: "/" %} {% assign author = page.url | split: "/" %}
{% assign author = author[1] %} {% assign author = author[1] %}
{% assign author = site.data.authors.authors | where: "prefix", author | first %} {% assign author = site.data.authors.authors | where: "directory", author | first %}
{% if page.header.overlay_color or page.overlay_image or page.header.image or author.banner %} {% if page.header.overlay_color or page.overlay_image or page.header.image or author.banner %}
{% include page__hero.html %} {% include page__hero.html %}
......
...@@ -24,7 +24,7 @@ collections: ...@@ -24,7 +24,7 @@ collections:
widget: "list" widget: "list"
fields: fields:
- { label: "Nom à afficher", name: "name", widget: string } - { label: "Nom à afficher", name: "name", widget: string }
- { required: false, label: "Nom court (pour l'url)", name: "prefix", widget: string } - { required: false, label: "Répertoire (nom court)", name: "directory", widget: string }
- { label: "Avatar", name: "avatar", widget: image } - { label: "Avatar", name: "avatar", widget: image }
- { required: false, label: "Image de partage", name: "og_image", widget: string } - { required: false, label: "Image de partage", name: "og_image", widget: string }
- { required: false, label: "Bannière par défaut", name: "banner", widget: string } - { required: false, label: "Bannière par défaut", name: "banner", widget: string }
......
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