From 4995f843c8e54f4c30ef8544aaec1c01bd7ef6df Mon Sep 17 00:00:00 2001
From: Orestis <orestis.malaspinas@pm.me>
Date: Wed, 23 Feb 2022 16:22:51 +0100
Subject: [PATCH] corrected problem with markdown merge

---
 slides/Makefile      | 6 +++---
 slides/intro.md      | 2 +-
 slides/metadata.yaml | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/slides/Makefile b/slides/Makefile
index 08a3692..de9d471 100644
--- a/slides/Makefile
+++ b/slides/Makefile
@@ -33,10 +33,10 @@ markdown: $(MARKDOWN) # La markdown les cibles %.markdown
 	pandoc -s $(OPTIONS) $(REVEALOPTIONS) -o $@ $^
 
 %.markdown: metadata.yaml %.md yq
-	sed '1 { /^---/ { :a N; /\n---/! ba; d} }' $< > no_header
-	grep -v -F -x -f  no_header $< > header.yaml
+	sed '1 { /^---/ { :a N; /\n---/! ba; d} }' $(shell echo $(word 2, $^)) > no_header
+	grep -v -F -x -f  no_header $(shell echo $(word 2, $^)) > header.yaml
 	echo "---" > tmp.yaml
-	./yq_linux_amd64 merge metadata.yaml header.yaml >> tmp.yaml
+	./yq_linux_amd64 merge header.yaml metadata.yaml >> tmp.yaml
 	cat tmp.yaml no_header > $@
 	rm no_header header.yaml tmp.yaml
 
diff --git a/slides/intro.md b/slides/intro.md
index 88282e2..a7d13e1 100644
--- a/slides/intro.md
+++ b/slides/intro.md
@@ -6,7 +6,7 @@ patat:
     margins:
         left: 10
         right: 10
-...
+---
 
 # La hotline
 
diff --git a/slides/metadata.yaml b/slides/metadata.yaml
index 13a7a5e..fe0a4d5 100644
--- a/slides/metadata.yaml
+++ b/slides/metadata.yaml
@@ -1,8 +1,8 @@
 ---
 subtitle: "Programmation séquentielle en C, 2021-2022"
 author: "Orestis Malaspinas (A401), ISC, HEPIA"
-institute: Inspirés des slides de F. Glück
-lang: fr-CH
+institute: "Inspirés des slides de F. Glück"
+lang: "fr-CH"
 revealjs-url: /reveal.js
 mathjaxurl: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"
 ---
-- 
GitLab