From 626796aa950f503838251857b7d7409d314d7c9f Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Sat, 12 Oct 2024 20:28:49 +0100 Subject: [PATCH] feat: add article for 2022 --- .eleventy.js | 22 +++++++++------------- data/press.js | 37 +++++++++++++++++++++++++++++++++++++ press.html | 16 +++++----------- 3 files changed, 51 insertions(+), 24 deletions(-) create mode 100644 data/press.js diff --git a/.eleventy.js b/.eleventy.js index 9c00eee..1ef7ce8 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,26 +1,22 @@ -import htmlmin from "html-minifier"; -import fetch from "node-fetch"; -import config from "./data/config.js"; import lightningCSS from "@11tyrocks/eleventy-plugin-lightningcss"; import { markdown as md } from "markdown"; -import { getExtensionFromLogoUrl, fetchImage } from "./.11ty/image.js"; -import { - createTalksCollections, - createTalksCollectionsBydate, - createFlatTalksCollections, -} from "./.11ty/talks.js"; +import fetch from "node-fetch"; import { minify } from "terser"; +import config from "./data/config.js"; +import press from "./data/press.js"; export default function (eleventyConfig) { // eleventyConfig.addCollection("talks", createTalksCollections); // eleventyConfig.addCollection("flatTalks", createFlatTalksCollections); // eleventyConfig.addCollection("talksByDate", createTalksCollectionsBydate); - + eleventyConfig.addCollection("press", async () => { + return Object.values(press).flat(); + }); eleventyConfig.addCollection("faqs", async () => { try { - const data = await fetch(config.cms4partnersApi + config.edition + "").then((res) => - res.json() - ); + const data = await fetch( + config.cms4partnersApi + config.edition + "" + ).then((res) => res.json()); const qanda = data.qanda .sort((f1, f2) => f1.order - f2.order) .map((q) => { diff --git a/data/press.js b/data/press.js new file mode 100644 index 0000000..d95bfd0 --- /dev/null +++ b/data/press.js @@ -0,0 +1,37 @@ +export default { + 2023: [ + { + title: "DevFest Lille 2023 : une conférence dans l’ère du temps !", + url: "https://www.sfeir.dev/tendances/un-devops-au-devfest-lille-2023/", + publishedAt: "26 mai 2023", + publishedBy: "Sfeir", + }, + { + title: "Réduire l’impact environnemental du Devfest Lille", + url: "https://welovedevs.com/fr/articles/reduire-limpact-environnemental-du-devfest-lille/", + publishedAt: "19 avril 2023", + publishedBy: "WeLoveDevs", + }, + ], + 2022: [ + { + title: "Retour sur DevFest Lille 2022", + url: "https://www.dnd.fr/retour-sur-devfest-lille-2022/", + publishedAt: "05 juillet 2022", + publishedBy: "Sfeir", + }, + + { + title: "DevFest Lille 2022: our insights", + url: "https://medium.com/adeo-tech/devfest-lille-2022-8a9104ef020a", + publishedAt: "20 juin 2022", + publishedBy: "Adeo", + }, + { + title: "[REX] DevFest Lille 2022 🍻", + url: "https://maximepawlak.medium.com/rex-devfest-lille-2022-9814f45eea52", + publishedAt: "13 juin 2022", + publishedBy: "DN'D", + }, + ], +}; diff --git a/press.html b/press.html index b045284..0968ca1 100644 --- a/press.html +++ b/press.html @@ -6,21 +6,15 @@

On parle de nous

- +
+ {%- for p in collections.press -%}
- - DevFest Lille 2023 : une conférence dans l’ère du temps ! -
-
Publié sur Sfeir.dev le 26 mai 2023
-
-
-
- - Réduire l’impact environnemental du Devfest Lille + {{p.title }}
-
Publié sur WeLoveDevs le 19 avril 2023
+
Publié sur {{p.publishedBy}} le {{p.publishedAt}}
+ {%- endfor -%}