test ajout des articles

This commit is contained in:
2024-01-03 13:19:09 +01:00
parent d0bd9ac2ca
commit 855af019a5
221 changed files with 2554 additions and 188 deletions

View File

@ -13,6 +13,13 @@
"image": "https://wiki.fuz.re/lib/exe/fetch.php?media=wiki:logo.png",
"link": "https://wiki.fuz.re/doku.php?id=evenements:creative_coding"
},
{
"name": "Creative Coding Bordeaux",
"place": "Bordeaux",
"description": "Creative Coding Bordeaux est un groupe destiné au partage des idées, techniques et passions autour de l'art algorithmique",
"image": "https://secure.meetupstatic.com/photos/event/b/7/a/2/clean_515327010.webp",
"link": "https://www.meetup.com/fr-FR/creative-coding-bordeaux/"
},
{
"name": "Digital Audio Community",
"place": "Lyon",

View File

@ -19,6 +19,22 @@ export const fetchMarkdownGuides = async () => {
};
})
);
return allGuides;
};
export const fetchMarkdownArticles = async () => {
const alLArticleFiles = import.meta.glob('/src/routes/articles/*.md');
const iterableArticleFiles = Object.entries(alLArticleFiles);
// Also return the content
const allArticles = await Promise.all(
iterableArticleFiles.map(async ([path, resolver]) => {
const { metadata } = await (resolver() as Promise<{ metadata: any }>);
const articlePath = path.slice(11, -3);
return {
meta: metadata,
path: articlePath,
};
})
);
return allArticles;
};