Skip to content

Repository files navigation

dpat.in

Personal site and CV of Den Patin. Static HTML, no JavaScript, four locales, served from the repository root by GitHub Pages.

Layout

  • src/content/shared.json — language-independent data: contacts, links, dates, stacks.
  • src/content/<locale>.json — all translatable text for one locale (en, zh-tw, de, ja).
  • src/i18n.js — locale registry (paths, hreflang, labels) and date formatting.
  • src/render.js — HTML rendering; src/styles.css is inlined into every page.
  • src/build.js — writes index.html, <locale>/index.html and sitemap.xml.

Generated pages are committed so that GitHub Pages can serve them without a build step; CI fails if they are out of date.

Commands

bun install
bun run build       # regenerate pages and sitemap
bun run check       # build, verify committed output, validate HTML, check formatting
bun run dev         # serve the site locally on http://localhost:3000
bun run lighthouse  # Lighthouse CI for all locales (needs Chrome)

Fonts

Roboto is loaded from the Google Fonts CDN (GOOGLE_FONTS in src/i18n.js). CJK pages use the platform fonts of their markets (PingFang TC / Microsoft JhengHei / Noto Sans CJK TC; Hiragino Sans / Yu Gothic / Meiryo / Noto Sans CJK JP): serving Noto Sans TC or JP from the CDN would add roughly 0.6 MB per page for the glyphs these pages use, against a total page weight of about 70 KB.

Editing content

Text lives only in src/content/*.json. Inline markup is limited to [label](key) links — key is an entry in shared.links or a #anchor — and **bold**. Run bun run build after editing.

About

Personal website

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages