Personal website, nuilt with Astro and the Twilight theme. Hosted on GitHub Pages at https://sebastian-schwindt.org.
The main branch contains the project sources. Every push to main triggers GitHub Actions, which builds the site and publishes the result to the gh-pages branch (the branch that GitHub Pages actually serves).
Pictures live in /public/assets/images/.
The site is written in English and auto-translated to French/German in the
browser by translate.js (xnx3) using the free Argos backend, whose output is
poor. Good translations are therefore supplied as manual overrides in
src/utils/language.ts via translate.nomenclature.append(...).
Workflow for every new post (do not skip):
-
Build/deploy the post in English first.
-
From the deployed page (not a local
dist/), copy each rendered text run and paste it intolanguage.tsas an identity entry for each target language, i.e.english text=english text:translate.nomenclature.append( "english", "deutsch", // and a second block for "french" "First sentence of the post.=First sentence of the post.\n" + "Next run of text.=Next run of text.\n" + // ...one line per text node, the whole post... );
-
Run the right-hand sides through a better translator (DeepL, a capable LLM, etc.) and replace the English with the real translation. The left-hand (key) side must stay exactly equal to the rendered English.
Non-negotiable rules (or the override silently does nothing):
- Key off DOM text nodes, not sentences. Inline
**bold**,*italic*and[links]split a sentence into several text nodes; each node is its own entry, in order. Proper nouns (names,TELEMAC,HydroBayesCal, …) stay asenglish=englishso they are kept verbatim. - Match the deployed DOM byte-for-byte. Astro's SmartyPants rewrites
punctuation: straight quotes become curly
‘ ’ “ ”, apostrophes become’,--becomes—, ranges become–. A stale localdist/can render these differently than production — always verify against the live HTML. - No
=,"or newlines inside a key or value.appendsplits each line on=and the block on\n; an entry with a stray=is dropped without warning. Use typographic quotes„ … “in values, never ASCII". - Ordering is handled automatically (longest key wins), so paste in reading order.
- This is intentionally fragile: editing the English later breaks that node's override and it falls back to Argos — re-copy the changed run from the live page.
See the existing hydrobayescal block in language.ts for a complete example.
- Node.js 24.x (current LTS).
- pnpm 9.x (the lockfile is generated by pnpm).
Recommended via nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 24
nvm use 24
npm install -g pnpm@9git clone https://github.com/sschwindt/ssc.github.io.git
cd ssc.github.io
pnpm installnvm use 24 && pnpm dev # http://localhost:4321Useful commands:
| Command | Action |
|---|---|
pnpm dev |
Start the local dev server |
pnpm build |
Build a production bundle into dist/ |
pnpm preview |
Preview the built site locally |
pnpm check |
Run Astro type/error checking |
twilight.config.yaml-- site title, subtitle, navbar links, profile, social media links shown in the top-left of the navbar (LinkedIn, Google Scholar, ResearchGate, GitHub, YouTube), wallpaper carousel, theme colour, particle effects, etc.src/content/about.md-- content of the About page.src/content/teaching.md-- content of the Teaching page.src/content/research.md-- content of the Research page.src/content/posts/-- blog/news posts (optional; empty by default). Usepnpm new-post <filename>to scaffold one.public/assets/images/-- wallpapers, avatar (ssc.png), favicon (hycon.png) and any other static assets.
git add -A && git commit -m "..." && git push # pushes to main, workflow rebuilds
Deployment is fully automated via .github/workflows/deploy.yml:
- Push commits to the
mainbranch. - GitHub Actions installs dependencies, runs
pnpm build, writes theCNAME(sebastian-schwindt.org) intodist/, and force-pushes the resulting static site to thegh-pagesbranch. - GitHub Pages serves
gh-pagesat the custom domain.
To trigger a deploy manually, use the Run workflow button on the Actions > Build and deploy to GitHub Pages page.
One-time GitHub Pages setup Settings → Pages: source = Deploy from a branch, branch =
gh-pages, folder =/ (root). The custom domainsebastian-schwindt.orgshould be set (it is also written intodist/CNAMEautomatically by the workflow).
If GitHub Actions is unavailable:
pnpm build
echo "sebastian-schwindt.org" > dist/CNAME
npx gh-pages -d dist -b gh-pages -fpnpm up --latest
pnpm install
pnpm build # sanity-checkWhen upgrading the Twilight theme, compare the upstream twilight.config.yaml and src/components/navbar.astro with the local versions -- both files have been customised (social media icons replace the home-pin logo, music player disabled, navbar links rewritten).
- Theme: Twilight by Spr_Aachen (MIT)
- Framework: Astro (MIT)
- Icons: Iconify (FontAwesome 6, Material Symbols)