diff --git a/.gitignore b/.gitignore index 9776e96..e1209d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ web !web/.gitkeep + +agendadulibre.xml +news.md diff --git a/Makefile b/Makefile index b8d942c..907da72 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,22 @@ TEMPLATE = template.html -all: web/style.css web/index.html web/contact.html web/legal.html web/about.html web/services.html +PANOC_BIN = pandoc +WGET_BIN = wget +XSLTPROC_BIN = xsltproc + +all: web/style.css web/index.html web/contact.html web/legal.html web/about.html web/services.html web/news.html + +clean: + rm agendadulibre.xml news.md web/style.css: style.css cp $< $@ web/%.html: %.md $(TEMPLATE) - pandoc --from markdown $< --output $@ --standalone --template $(TEMPLATE) + $(PANOC_BIN) --from markdown $< --output $@ --standalone --template $(TEMPLATE) + +agendadulibre.xml: + $(WGET_BIN) --output-document=$@ 'https://www.agendadulibre.org/events.xml?tag=cagull&future=false' + +news.md: agendadulibre.xsl agendadulibre.xml + $(XSLTPROC_BIN) $^ > $@ diff --git a/README.md b/README.md index f5dedfa..08fdd6f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ Projet git de la page d'accueil -Pour générer : +Pour générer le site statique dans le dossier `web` : + +``` +make all +``` + +Pour régénérer aussi la page d'actualités depuis l'Agenda du libre : + ``` -pandoc --from markdown index.md --output index.html --standalone --template template.html +make clean all ``` diff --git a/agendadulibre.xsl b/agendadulibre.xsl new file mode 100644 index 0000000..0528d90 --- /dev/null +++ b/agendadulibre.xsl @@ -0,0 +1,27 @@ + + + + + --- title: Actualités --- Les événements liés à l'association sont publiés sur [l'Agenda du libre](https://www.agendadulibre.org). + + + + ## + + + **Date:** + + + **Lieu:** + + * + + à + + * + + + + + + diff --git a/template.html b/template.html index 3a1dd46..7a6d069 100644 --- a/template.html +++ b/template.html @@ -16,6 +16,7 @@