Skip to content

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 ​

  1. Create a scoped key:
    • Against touched.page Cloud: open https://touched.page/settings -> Extension & Keys -> create a tp_live_... key with read:self.
    • Against self-hosted touched-node: use your node's OWNER_KEY (tp_live_...).
  2. Fork or import to Vercel:
  3. Set server-side environment variables (never expose the key via NEXT_PUBLIC_ or browser bundles):
VariableValue
TOUCHED_API_KEYYour tp_live_... scoped API key or OWNER_KEY
TOUCHED_API_BASE_URLhttps://touched.page (or your touched-node HTTPS origin)
TOUCHED_CACHE_TTL_SECONDSOptional 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) ​

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 ​

AttributeDescription
work-titleDisplay title of the work
categorygame · screen · book · audio · other
ratingSubjective tier 1–5 (optional)
tier-labelCustom tier label override (e.g. S or 夯)
statusFree-form status string (e.g. Finished, Vol. 5)
noteShort review excerpt
cover-urlPoster image URL (loaded directly in browser with referrerpolicy="no-referrer")
work-urlOriginal platform link (Steam, Douban, Bangumi, etc.)
discuss-urlLink to the work's review aggregation page on touched.page or your node

Local Development ​

bash
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

Open-core ecosystem under MIT License. Built around works, writing, and data sovereignty.