Custom Frontend & Embeddable Work Cards
Want a personal site on your own domain with completely custom typography, layout, or animations—without managing a database? Or want to drop clean media review cards inside your existing Hugo, Astro, Hexo, or WordPress blog?
1. One-Click Zero-DB Vercel Template (touched-frontend)
touched-page/touched-frontend (MIT License) is an official zero-database Next/Web template that pulls your data server-side via a scoped API key—works equally well against https://touched.page or your self-hosted touched-node.
Deploy Steps
- Create a scoped key:
- Against
touched.pageCloud: openhttps://touched.page/settings-> Extension & Keys -> create atp_live_...key withread:self. - Against self-hosted
touched-node: use your node'sOWNER_KEY(tp_live_...).
- Against
- Fork or import to Vercel:
- Visit
touched-page/touched-frontend, click Use this template (or Vercel's one-click deploy link in the README).
- Visit
- Set server-side environment variables (never expose the key via
NEXT_PUBLIC_or browser bundles):
| Variable | Value |
|---|---|
TOUCHED_API_KEY | Your tp_live_... scoped API key or OWNER_KEY |
TOUCHED_API_BASE_URL | https://touched.page (or your touched-node HTTPS origin) |
TOUCHED_CACHE_TTL_SECONDS | Optional cache TTL in seconds (default 30, with 300s stale-while-revalidate fallback) |
Your deployed site immediately renders / (Me), /?tab=blog (Posts), /?tab=library (Library), /posts/:id (Article Reader), and /rss.xml—and you own every line of HTML/CSS to customize freely.
2. Embed <touched-work-card> in Any External Blog
touched-frontend (and the @touched/widgets package) builds a zero-dependency standalone browser bundle (widgets.browser.js) registering the <touched-work-card> Web Component with Shadow DOM isolation so it never clashes with your blog's CSS.
Usage Example (Hugo / Astro / Hexo / WordPress / Plain HTML)
<script src="https://your-site.example/widgets.browser.js" defer></script>
<touched-work-card
work-title="Disco Elysium"
category="game"
rating="5"
status="Second playthrough"
note="Every inner voice fights to preserve a sliver of dignity in the rain."
cover-url="https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/632470/library_600x900_2x.jpg"
work-url="https://store.steampowered.com/app/632470/"
discuss-url="https://touched.page/works/k7m4p9x2"
></touched-work-card>Supported Attributes
| Attribute | Description |
|---|---|
work-title | Display title of the work |
category | game · screen · book · audio · other |
rating | Subjective tier 1–5 (optional) |
tier-label | Custom tier label override (e.g. S or 夯) |
status | Free-form status string (e.g. Finished, Vol. 5) |
note | Short review excerpt |
cover-url | Poster image URL (loaded directly in browser with referrerpolicy="no-referrer") |
work-url | Original platform link (Steam, Douban, Bangumi, etc.) |
discuss-url | Link to the work's review aggregation page on touched.page or your node |
Local Development
git clone https://github.com/touched-page/touched-frontend.git
cd touched-frontend
cp .env.example .env
pnpm install
pnpm run build:widgets
pnpm dev