From af2fa6fafc9f1a64dda923a16dc07d0868296b56 Mon Sep 17 00:00:00 2001
From: Eloi Perdereau <eloi@perdereau.eu>
Date: Sat, 9 Nov 2019 02:03:28 +0100
Subject: [PATCH] step by step

---
 _authors/clara.md                            |  6 ++
 _authors/lucas.md                            |  6 ++
 _config.yml                                  | 73 +++++---------------
 _data/navigation.yml                         |  8 +++
 _includes/navigation.html                    |  7 +-
 _layouts/author.html                         | 15 ++++
 _layouts/default.html                        | 14 ++++
 _layouts/post.html                           | 14 ++++
 _posts/2019-11-08-welcome-to-jekyll.markdown | 36 +++-------
 _posts/2019-11-09-lucas-post.markdown        | 29 ++++++++
 about.markdown                               |  2 -
 blog.markdown                                | 10 +++
 index.markdown                               |  8 +--
 staff.markdown                               | 12 ++++
 14 files changed, 152 insertions(+), 88 deletions(-)
 create mode 100644 _authors/clara.md
 create mode 100644 _authors/lucas.md
 create mode 100644 _data/navigation.yml
 create mode 100644 _layouts/author.html
 create mode 100644 _layouts/default.html
 create mode 100644 _layouts/post.html
 create mode 100644 _posts/2019-11-09-lucas-post.markdown
 create mode 100644 blog.markdown
 create mode 100644 staff.markdown

diff --git a/_authors/clara.md b/_authors/clara.md
new file mode 100644
index 0000000..6ee2779
--- /dev/null
+++ b/_authors/clara.md
@@ -0,0 +1,6 @@
+---
+short_name: clara
+name: Clara Terrier
+position: Secrétaire
+---
+tip tap top
diff --git a/_authors/lucas.md b/_authors/lucas.md
new file mode 100644
index 0000000..9e714a3
--- /dev/null
+++ b/_authors/lucas.md
@@ -0,0 +1,6 @@
+---
+short_name: lucas
+name: Lucas Schneider
+position: Président
+---
+Lulu président!
diff --git a/_config.yml b/_config.yml
index e9a6363..203825c 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,56 +1,19 @@
-# Welcome to Jekyll!
-#
-# This config file is meant for settings that affect your whole blog, values
-# which you are expected to set up once and rarely edit after that. If you find
-# yourself editing this file very often, consider using Jekyll's data files
-# feature for the data you need to update frequently.
-#
-# For technical reasons, this file is *NOT* reloaded automatically when you use
-# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
-#
-# If you need help with YAML syntax, here are some quick references for you: 
-# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
-# https://learnxinyminutes.com/docs/yaml/
-#
-# Site settings
-# These are used to personalize your new site. If you look in the HTML files,
-# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
-# You can create any custom variable you would like, and they will be accessible
-# in the templates via {{ site.myvariable }}.
+collections:
+  authors:
+    output: true
 
-title: Your awesome title
-email: your-email@example.com
-description: >- # this means to ignore newlines until "baseurl:"
-  Le Centre Culturel de Luminy (CCL) est une association étudiante dont
-  l'objectif est d'animer et de développer des activités autour de notions telles
-  que la culture, la citoyenneté, la liberté d'expression, l'art, le partage des
-  connaissances et la prise d'initiatives sociales.
-baseurl: "" # the subpath of your site, e.g. /blog
-url: "" # the base hostname & protocol for your site, e.g. http://example.com
-twitter_username: jekyllrb
-github_username:  jekyll
-
-# Build settings
-theme: minima
-plugins:
-  - jekyll-feed
-
-# Exclude from processing.
-# The following items will not be processed, by default.
-# Any item listed under the `exclude:` key here will be automatically added to
-# the internal "default list".
-#
-# Excluded items can be processed by explicitly listing the directories or
-# their entries' file path in the `include:` list.
-#
-# exclude:
-#   - .sass-cache/
-#   - .jekyll-cache/
-#   - gemfiles/
-#   - Gemfile
-#   - Gemfile.lock
-#   - node_modules/
-#   - vendor/bundle/
-#   - vendor/cache/
-#   - vendor/gems/
-#   - vendor/ruby/
+defaults:
+  - scope:
+      path: ""
+      type: "authors"
+    values:
+      layout: "author"
+  - scope:
+      path: ""
+      type: "posts"
+    values:
+      layout: "post"
+  - scope:
+      path: ""
+    values:
+      layout: "default"
diff --git a/_data/navigation.yml b/_data/navigation.yml
new file mode 100644
index 0000000..df9b21c
--- /dev/null
+++ b/_data/navigation.yml
@@ -0,0 +1,8 @@
+- name: Home
+  link: /
+- name: About
+  link: /about.html
+- name: Blog
+  link: /blog.html
+- name: Staff
+  link: /staff.html
diff --git a/_includes/navigation.html b/_includes/navigation.html
index f755be5..65910e5 100644
--- a/_includes/navigation.html
+++ b/_includes/navigation.html
@@ -1,4 +1,7 @@
 <nav>
-  <a href="/">Home</a>
-  <a href="/about.html">About</a>
+  {% for item in site.data.navigation %}
+  <a href="{{ item.link }}" {% if page.url == item.link %}style="color: red;"{% endif %}>
+    {{ item.name }}
+  </a>
+  {% endfor %}
 </nav>
diff --git a/_layouts/author.html b/_layouts/author.html
new file mode 100644
index 0000000..2e08aac
--- /dev/null
+++ b/_layouts/author.html
@@ -0,0 +1,15 @@
+<!-- _layouts/author.html -->
+<h1>{{ page.name }}</h1>
+<h2>{{ page.position }}</h2>
+
+{{ content }}
+
+<h2>Posts</h2>
+<ul>
+  {% assign filtered_posts = site.posts | where: 'author', page.short_name %} {% for
+  post in filtered_posts %}
+  <li>
+    <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
+  </li>
+  {% endfor %}
+</ul>
diff --git a/_layouts/default.html b/_layouts/default.html
new file mode 100644
index 0000000..e55958c
--- /dev/null
+++ b/_layouts/default.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>{{ page.title }}</title>
+  </head>
+  <body>
+    {% include navigation.html %}
+    {{ content }}
+  </body>
+  <footer>
+    default layout
+  </footer>
+</html>
diff --git a/_layouts/post.html b/_layouts/post.html
new file mode 100644
index 0000000..e4acd37
--- /dev/null
+++ b/_layouts/post.html
@@ -0,0 +1,14 @@
+<!-- _layouts/post.html -->
+<h1>{{ page.title }}</h1>
+
+<p>
+  {{ page.date | date_to_string }}
+  {% assign author = site.authors | where: 'short_name', page.author | first %}
+  {% if author %}
+    - <a href="{{ author.url }}">{{ author.name }}</a>
+  {% endif %}
+</p>
+
+{{ content }}
+
+post layout
diff --git a/_posts/2019-11-08-welcome-to-jekyll.markdown b/_posts/2019-11-08-welcome-to-jekyll.markdown
index 8fc1489..9285689 100644
--- a/_posts/2019-11-08-welcome-to-jekyll.markdown
+++ b/_posts/2019-11-08-welcome-to-jekyll.markdown
@@ -1,29 +1,15 @@
 ---
-layout: post
-title:  "Welcome to Jekyll!"
-date:   2019-11-08 21:45:27 +0100
-categories: jekyll update
+title:  "Nouveau site"
+date:   2019-11-09 01:45:27 +0100
+categories: jekyll site
 ---
-You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
+un test de post
 
-Jekyll requires blog post files to be named according to the following format:
+`avec un peu de code`
+et *de l'italique*
 
-`YEAR-MONTH-DAY-title.MARKUP`
-
-Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.
-
-Jekyll also offers powerful support for code snippets:
-
-{% highlight ruby %}
-def print_hi(name)
-  puts "Hi, #{name}"
-end
-print_hi('Tom')
-#=> prints 'Hi, Tom' to STDOUT.
-{% endhighlight %}
-
-Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
-
-[jekyll-docs]: https://jekyllrb.com/docs/home
-[jekyll-gh]:   https://github.com/jekyll/jekyll
-[jekyll-talk]: https://talk.jekyllrb.com/
+puis des listes
+ - un
+   vrai bordel
+   * plop
+ - deux
diff --git a/_posts/2019-11-09-lucas-post.markdown b/_posts/2019-11-09-lucas-post.markdown
new file mode 100644
index 0000000..fa06a32
--- /dev/null
+++ b/_posts/2019-11-09-lucas-post.markdown
@@ -0,0 +1,29 @@
+---
+title:  "Welcome to Jekyll!"
+date:   2019-11-08 21:45:27 +0100
+author: lucas
+categories: jekyll update
+---
+You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
+
+Jekyll requires blog post files to be named according to the following format:
+
+`YEAR-MONTH-DAY-title.MARKUP`
+
+Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.
+
+Jekyll also offers powerful support for code snippets:
+
+{% highlight ruby %}
+def print_hi(name)
+  puts "Hi, #{name}"
+end
+print_hi('Tom')
+#=> prints 'Hi, Tom' to STDOUT.
+{% endhighlight %}
+
+Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
+
+[jekyll-docs]: https://jekyllrb.com/docs/home
+[jekyll-gh]:   https://github.com/jekyll/jekyll
+[jekyll-talk]: https://talk.jekyllrb.com/
diff --git a/about.markdown b/about.markdown
index 28d3e69..ed4e262 100644
--- a/about.markdown
+++ b/about.markdown
@@ -1,7 +1,5 @@
 ---
-layout: page
 title: About
-permalink: /about/
 ---
 Le titre c'est {{ page.title }}
 
diff --git a/blog.markdown b/blog.markdown
new file mode 100644
index 0000000..8c7ff1d
--- /dev/null
+++ b/blog.markdown
@@ -0,0 +1,10 @@
+---
+title: Blog
+---
+Latest Posts
+============
+
+{% for post in site.posts %}
+ - [{{ post.title }}]({{ post.url }})
+     {{ post.excerpt }}
+  {% endfor %}
diff --git a/index.markdown b/index.markdown
index 2fa6ced..bd3803d 100644
--- a/index.markdown
+++ b/index.markdown
@@ -1,8 +1,8 @@
 ---
-# Feel free to add content and custom Front Matter to this file.
-# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
-
-layout: home
+title: Titre page
+---
+{{ page.title }}
 ---
+
 here is my home?
 {{ site.layout }}
diff --git a/staff.markdown b/staff.markdown
new file mode 100644
index 0000000..572f3ef
--- /dev/null
+++ b/staff.markdown
@@ -0,0 +1,12 @@
+---
+title: Staff
+---
+Staff
+=====
+
+{% for author in site.authors %}
+  [{{ author.name }}]({{ site.baseurl }}{{ author.url }})
+  {{ author.position }}
+  {{ author.content | markdownify }}
+
+{% endfor %}
-- 
GitLab