diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 22a1505..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d642209..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/package-lock.json b/package-lock.json index c2d2ab4..3fd06be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@astrojs/mdx": "^4.3.13", "@tailwindcss/vite": "^4.1.18", - "astro": "^5.16.8", + "astro": "^5.16.15", "tailwindcss": "^4.1.18" } }, @@ -2057,9 +2057,9 @@ } }, "node_modules/astro": { - "version": "5.16.8", - "resolved": "https://registry.npmjs.org/astro/-/astro-5.16.8.tgz", - "integrity": "sha512-gzZE+epuCrNuxOa8/F1dzkllDOFvxWhGeobQKeBRIAef5sUpUKMHZo/8clse+02rYnKJCgwXBgjW4uTu9mqUUw==", + "version": "5.16.15", + "resolved": "https://registry.npmjs.org/astro/-/astro-5.16.15.tgz", + "integrity": "sha512-+X1Z0NTi2pa5a0Te6h77Dgc44fYj63j1yx6+39Nvg05lExajxSq7b1Uj/gtY45zoum8fD0+h0nak+DnHighs3A==", "license": "MIT", "dependencies": { "@astrojs/compiler": "^2.13.0", @@ -2080,8 +2080,8 @@ "cssesc": "^3.0.0", "debug": "^4.4.3", "deterministic-object-hash": "^2.0.2", - "devalue": "^5.6.1", - "diff": "^5.2.0", + "devalue": "^5.6.2", + "diff": "^8.0.3", "dlv": "^1.1.3", "dset": "^3.1.4", "es-module-lexer": "^1.7.0", @@ -2106,16 +2106,16 @@ "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.3", - "shiki": "^3.20.0", + "shiki": "^3.21.0", "smol-toml": "^1.6.0", "svgo": "^4.0.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", - "unifont": "~0.7.1", + "unifont": "~0.7.3", "unist-util-visit": "^5.0.0", - "unstorage": "^1.17.3", + "unstorage": "^1.17.4", "vfile": "^6.0.3", "vite": "^6.4.1", "vitefu": "^1.1.1", @@ -2270,15 +2270,15 @@ } }, "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -2542,9 +2542,9 @@ } }, "node_modules/devalue": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.1.tgz", - "integrity": "sha512-jDwizj+IlEZBunHcOuuFVBnIMPAEHvTsJj0BcIp94xYguLRVBcXO853px/MyIJvbVzWdsGvrRweIUWJw8hBP7A==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.2.tgz", + "integrity": "sha512-nPRkjWzzDQlsejL1WVifk5rvcFi/y1onBRxjaFMjZeR9mFpqu2gmAZ9xUB9/IEanEP/vBtGeGganC/GO1fmufg==", "license": "MIT" }, "node_modules/devlop": { @@ -2561,9 +2561,9 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.3.tgz", + "integrity": "sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==", "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -2962,9 +2962,9 @@ "license": "ISC" }, "node_modules/h3": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.4.tgz", - "integrity": "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.5.tgz", + "integrity": "sha512-xEyq3rSl+dhGX2Lm0+eFQIAzlDN6Fs0EcC4f7BNUmzaRX/PTzeuM+Tr2lHB8FoXggsQIeXLj8EDVgs5ywxyxmg==", "license": "MIT", "dependencies": { "cookie-es": "^1.2.2", @@ -2972,9 +2972,9 @@ "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", - "node-mock-http": "^1.0.2", + "node-mock-http": "^1.0.4", "radix3": "^1.1.2", - "ufo": "^1.6.1", + "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, @@ -3660,10 +3660,13 @@ } }, "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } }, "node_modules/magic-string": { "version": "0.30.21", @@ -5049,12 +5052,12 @@ "license": "MIT" }, "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -5769,9 +5772,9 @@ } }, "node_modules/ufo": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.2.tgz", - "integrity": "sha512-heMioaxBcG9+Znsda5Q8sQbWnLJSl98AFDXTO80wELWEzX3hordXsTdxrIfMQoO9IY1MEnoGoPjpoKpMj+Yx0Q==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", "license": "MIT" }, "node_modules/ultrahtml": { @@ -5806,9 +5809,9 @@ } }, "node_modules/unifont": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/unifont/-/unifont-0.7.1.tgz", - "integrity": "sha512-0lg9M1cMYvXof8//wZBq6EDEfbwv4++t7+dYpXeS2ypaLuZJmUFYEwTm412/1ED/Wfo/wyzSu6kNZEr9hgRNfg==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/unifont/-/unifont-0.7.3.tgz", + "integrity": "sha512-b0GtQzKCyuSHGsfj5vyN8st7muZ6VCI4XD4vFlr7Uy1rlWVYxC3npnfk8MyreHxJYrz1ooLDqDzFe9XqQTlAhA==", "license": "MIT", "dependencies": { "css-tree": "^3.1.0", @@ -5953,19 +5956,19 @@ } }, "node_modules/unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "license": "MIT", "dependencies": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", @@ -5974,14 +5977,14 @@ "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3 || ^7.0.0", + "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", - "@vercel/kv": "^1.0.1", + "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", diff --git a/package.json b/package.json index e102d41..1e88ad5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dependencies": { "@astrojs/mdx": "^4.3.13", "@tailwindcss/vite": "^4.1.18", - "astro": "^5.16.8", + "astro": "^5.16.15", "tailwindcss": "^4.1.18" } } diff --git a/src/content.config.ts b/src/content.config.ts new file mode 100644 index 0000000..8d1af2d --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,36 @@ +import { defineCollection, z } from 'astro:content'; +import { glob } from 'astro/loaders'; + +const bujo = defineCollection({ + loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/bujo" }), + schema: z.object({ + title: z.string(), + publishDate: z.date(), + }).passthrough(), +}); + +const codex = defineCollection({ + loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/codex" }), + schema: z.object({}).passthrough(), // TODO: Définir un schéma plus strict +}); + +const journal = defineCollection({ + loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/journal" }), + schema: z.object({ + title: z.string(), + author: z.string(), + publishDate: z.date(), + tags: z.array(z.string()), + }).passthrough(), +}); + +const logs = defineCollection({ + loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/logs" }), + schema: z.object({ + title: z.string(), + publishDate: z.date(), + tags: z.array(z.string()), + }).passthrough(), +}); + +export const collections = { bujo, codex, journal, logs }; \ No newline at end of file diff --git a/src/pages/bujo/[...slug].astro b/src/pages/bujo/[...slug].astro index d61120a..d3840d4 100644 --- a/src/pages/bujo/[...slug].astro +++ b/src/pages/bujo/[...slug].astro @@ -1,5 +1,5 @@ --- -import { getCollection, getEntry } from 'astro:content'; +import { getCollection, render } from 'astro:content'; import LifeLayout from '../../layouts/LifeLayout.astro'; // Import des composants de page pour les garder modulaires @@ -15,10 +15,10 @@ import CollectionFilms from '../../components/bujo/CollectionFilms.astro'; export async function getStaticPaths() { const bujoEntries = await getCollection('bujo'); - const paths = bujoEntries.map(entry => ({ - params: { slug: entry.slug } - })); - + const paths = bujoEntries.map(entry => { + const slug = entry.id.replace(/\.(md|mdx)$/, ''); + return { params: { slug } }; + }); // Ajouter les routes statiques/virtuelles paths.push({ params: { slug: undefined } }); // Index paths.push({ params: { slug: 'keys' } }); @@ -35,7 +35,7 @@ export async function getStaticPaths() { // Ajouter les routes pour les mois const uniqueMonths = new Set(); bujoEntries.forEach(log => { - const [year, month] = log.slug.split('/'); + const [year, month] = log.id.split('/'); if (year && month && !isNaN(parseInt(year)) && !isNaN(parseInt(month))) { uniqueMonths.add(`${year}/${month}`); } @@ -54,7 +54,7 @@ if (slug === undefined) { const allLogs = await getCollection('bujo'); const uniqueMonths = new Set(); allLogs.forEach(log => { - const [year, month] = log.slug.split('/'); + const [year, month] = log.id.split('/'); if (year && month && !isNaN(parseInt(year)) && !isNaN(parseInt(month))) { uniqueMonths.add(`${year}/${month}`); } @@ -88,7 +88,7 @@ else if (slug.startsWith('collections/')) { // 4. Gérer les logs mensuels (ex: /bujo/2026/01) else if (slug.match(/^\d{4}\/\d{2}$/)) { const [year, month] = slug.split('/'); - const monthlyLogs = await getCollection('bujo', ({ slug: logSlug }) => logSlug.startsWith(slug)); + const monthlyLogs = await getCollection('bujo', ({ id }) => id.startsWith(slug)); Astro.props.page = 'monthly-log'; Astro.props.logs = monthlyLogs; Astro.props.year = year; @@ -96,9 +96,10 @@ else if (slug.match(/^\d{4}\/\d{2}$/)) { } // 5. Gérer les entrées de contenu (Daily Logs) else { - const entry = await getEntry('bujo', slug); + const bujoEntries = await getCollection('bujo'); + const entry = bujoEntries.find(e => e.id.replace(/\.(md|mdx)$/, '') === slug); if (entry) { - const { Content } = await entry.render(); + const { Content } = await render(entry); Astro.props.page = 'entry'; Astro.props.entry = entry; Astro.props.Content = Content; diff --git a/src/pages/index.astro b/src/pages/index.astro index 310a830..46d47a6 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,45 +1,12 @@ --- -import GameLayout from '../layouts/GameLayout.astro'; -import GoldButton from '../components/ui/GoldButton.astro'; --- - - -

Bienvenue sur le projet JDR Sweet Journey !

-

L'Ambition

-

L'objectif est de créer un clone entièrement web de l'application mobile AFK Journey. Ce projet sera une vitrine technologique utilisant :

-
    -
  • La modélisation 3D et l'animation (2D et 3D) réalisées avec Blender.
  • -
  • La retranscription de ces éléments dans le navigateur grâce à Three.js.
  • -
-
    - -
-

Si en plus, cette plateforme peut servir de point de repère pour nos aventures de jeu de rôle, c'est une pierre deux coups !

- -

Le Voyage

-

Ce site est aussi un levier pour maîtriser les paradigmes technologiques de demain. Explorez le journal d'aventure pour suivre la quête, ou consultez les logs de construction pour voir les coulisses techniques.

- -
    - - - -
- -

Quelle ambition, jeune batracien...

-
+ + + + + Astro + + + astro + + diff --git a/src/pages/sweet.astro b/src/pages/sweet.astro new file mode 100644 index 0000000..e69de29