| @ -1,2 +1,5 @@ | |||||
| web | web | ||||
| !web/.gitkeep | !web/.gitkeep | ||||
| agendadulibre.xml | |||||
| news.md | |||||
| @ -1,9 +1,22 @@ | |||||
| TEMPLATE = template.html | 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 | web/style.css: style.css | ||||
| cp $< $@ | cp $< $@ | ||||
| web/%.html: %.md $(TEMPLATE) | 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) $^ > $@ | |||||
| @ -1,6 +1,13 @@ | |||||
| Projet git de la page d'accueil | 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 | |||||
| ``` | ``` | ||||
| @ -0,0 +1,27 @@ | |||||
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |||||
| <xsl:output method="text" /> | |||||
| <xsl:strip-space elements="*"/> | |||||
| <xsl:template match="/"> | |||||
| <xsl:text>---
title: Actualités
---

Les événements liés à l'association sont publiés sur [l'Agenda du libre](https://www.agendadulibre.org).

</xsl:text> | |||||
| <xsl:for-each select="/events/event"> | |||||
| <xsl:sort select="start-time" order="descending" /> | |||||
| <xsl:if test="position() <= 10"> | |||||
| <xsl:text>## </xsl:text> | |||||
| <xsl:value-of select="title"/> | |||||
| <xsl:text>

</xsl:text> | |||||
| <xsl:text>**Date:** </xsl:text> | |||||
| <xsl:value-of select="start-time"/> | |||||
| <xsl:text> 
</xsl:text> | |||||
| <xsl:text>**Lieu:** </xsl:text> | |||||
| <xsl:value-of select="place_name"/> | |||||
| <xsl:text> *</xsl:text> | |||||
| <xsl:value-of select="address"/> | |||||
| <xsl:text> à </xsl:text> | |||||
| <xsl:value-of select="city"/> | |||||
| <xsl:text>*

</xsl:text> | |||||
| <xsl:value-of select="normalize-space(description)"/> | |||||
| <xsl:text>

</xsl:text> | |||||
| </xsl:if> | |||||
| </xsl:for-each> | |||||
| </xsl:template> | |||||
| </xsl:stylesheet> | |||||