diff --git a/README.md b/README.md index 3cd73b7..abbc566 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Date used for the news is the date the file was created in git. ### HTML generation -We use https://git.collectivit.org/collectivit/jean-website to generate the +We use https://git.collectivit.org/collectivit/jean-web to generate the website. Jinja2 templates are stored in the src directory, and use the content loaded from the 'content' folder to generate static pages. Content can be markdown document with metadata, or json files. diff --git a/content/games/the-guild.md b/content/en/games/the-guild.md similarity index 94% rename from content/games/the-guild.md rename to content/en/games/the-guild.md index 4444356..42ff570 100644 --- a/content/games/the-guild.md +++ b/content/en/games/the-guild.md @@ -1,5 +1,5 @@ --- -picture: the-guild.png +picture: games/the-guild.png picture_alt: in-game screenshot of a cow-boy riding in wilderness website: https://the-guild.frog-collective.org --- @@ -11,3 +11,4 @@ dusty trails of the Old West lead to riches beyond your wildest dreams. In this thrilling adventure, you step into the boots of a rugged prospector, venturing into uncharted territories to uncover precious resources for a greedy guild hungry for wealth and power. + diff --git a/content/games/the-guild.png b/content/en/games/the-guild.png similarity index 100% rename from content/games/the-guild.png rename to content/en/games/the-guild.png diff --git a/content/news/2024-21-05-test-news.md b/content/en/news/2024-21-05-test-news.md similarity index 100% rename from content/news/2024-21-05-test-news.md rename to content/en/news/2024-21-05-test-news.md diff --git a/content/presentation/adrien.png b/content/en/presentation/adrien.png similarity index 100% rename from content/presentation/adrien.png rename to content/en/presentation/adrien.png diff --git a/content/presentation/aurel.png b/content/en/presentation/aurel.png similarity index 100% rename from content/presentation/aurel.png rename to content/en/presentation/aurel.png diff --git a/content/presentation/members.yaml b/content/en/presentation/members.yaml similarity index 50% rename from content/presentation/members.yaml rename to content/en/presentation/members.yaml index dd7c564..59d87c1 100644 --- a/content/presentation/members.yaml +++ b/content/en/presentation/members.yaml @@ -1,6 +1,6 @@ - name: Aurel description: Art - avatar: ./aurel.png + avatar: presentation/aurel.png - name: Adrien description: Dev - avatar: ./adrien.png + avatar: presentation/adrien.png diff --git a/content/presentation/presentation.md b/content/en/presentation/presentation.md similarity index 100% rename from content/presentation/presentation.md rename to content/en/presentation/presentation.md diff --git a/content/games-fr/the-guild.md b/content/fr/games/the-guild.md similarity index 81% rename from content/games-fr/the-guild.md rename to content/fr/games/the-guild.md index 17651b2..c890cca 100644 --- a/content/games-fr/the-guild.md +++ b/content/fr/games/the-guild.md @@ -1,5 +1,5 @@ --- -picture: ../games/the-guild.png +picture: games/the-guild.png picture_alt: Image de jeux avec un cowboy website: https://the-guild.frog-collective.org --- diff --git a/content/news-fr/2024-21-05-test-news.md b/content/fr/news/2024-21-05-test-news.md similarity index 100% rename from content/news-fr/2024-21-05-test-news.md rename to content/fr/news/2024-21-05-test-news.md diff --git a/content/presentation/presentation-fr.md b/content/fr/presentation/presentation.md similarity index 100% rename from content/presentation/presentation-fr.md rename to content/fr/presentation/presentation.md diff --git a/noxfile.py b/noxfile.py index 5a318c6..e9219fc 100644 --- a/noxfile.py +++ b/noxfile.py @@ -25,7 +25,7 @@ def build(session: Session) -> None: """Run unit tests.""" session.install( "nodeenv", - "git+https://git.collectivit.org/collectivit/jean-website", + "git+https://git.collectivit.org/collectivit/jean-web", "babel", "jinja2" ) @@ -54,7 +54,7 @@ def build(session: Session) -> None: session.log("Building website...") session.run( - "jwebsite", "build", + "jweb", "build", env={ 'FROG_LOCALE_DIR': str(locale_dir) } diff --git a/site.py b/site.py index 2a8d255..345dc7f 100644 --- a/site.py +++ b/site.py @@ -1,6 +1,12 @@ from os import environ +site.load_extensions( + "jweb.extensions.yaml", + "jweb.extensions.git", + "jweb.extensions.markdown" +) + if "FROG_LOCALE_DIR" in environ: - site.set_translations("site", environ["FROG_LOCALE_DIR"], languages=["fr"]) + site.load_translations("site", environ["FROG_LOCALE_DIR"], "fr") site.render('pages/index.html', 'index.html') diff --git a/src/pages/index/games.html b/src/pages/index/games.html index a702fc7..76eed68 100644 --- a/src/pages/index/games.html +++ b/src/pages/index/games.html @@ -4,23 +4,21 @@ {% extends "lib/section.html.j2" %} {% block content %} - {% with content = site.content.load("games") %} - {% for game in content.glob("*.md") %} -