This commit is contained in:
Greg Kilmer
2026-07-06 22:35:23 -04:00
parent 6c50217bc6
commit 64f33c1ef5
10 changed files with 581 additions and 0 deletions
+33
View File
@@ -234,6 +234,39 @@ It's idempotent — run it again any time you add games to the JSON.
---
## TCGs (Trading Card Games page)
The TCGs page (`src/pages/interests/tcgs.astro`) is hand-built, like the other
interest pages. Two parts are data-driven:
- **The games I play** and **Proxy making** are inline frontmatter arrays of
`{ icon, title, body }` — edit them directly on the page.
- **Magic: The Gathering decks** are pulled **live from Archidekt** on the
server (the site is SSR, so no CORS or API key is needed).
### Archidekt integration
`src/lib/archidekt.ts` fetches Greg's public decks from:
```
GET https://archidekt.com/api/decks/v3/?ownerUsername=<username>
```
- The username is the `ARCHIDEKT_USERNAME` export (currently `Patiun`). Change
it there to point at a different account.
- Results are cached to `node_modules/.cache/archidekt-<username>.json` for
`CACHE_TTL_MS` (default **1 hour**) so repeat visits are instant and we're
gentle on Archidekt. Tune the TTL via that export.
- Only public, non-unlisted decks are shown. If Archidekt is unreachable, the
section falls back to a "Manage on Archidekt" link — it never breaks the page.
Each deck renders as a `DeckCard` (featured card art, mana-color pips, card
count, format, last-updated) linking to its Archidekt page. To add or remove
decks, just change them on Archidekt — the page picks them up automatically
(within the cache window).
---
## Interest pages
Each interest is a hand-built page in `src/pages/interests/`. They follow the