Skip to content

sschwindt/sschwindt.github.io

Repository files navigation

sebastian-schwindt.org

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/.


⚠️ Translations — read this BEFORE publishing a blog post

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):

  1. Build/deploy the post in English first.

  2. From the deployed page (not a local dist/), copy each rendered text run and paste it into language.ts as 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...
    );
  3. 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 as english=english so 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 local dist/ can render these differently than production — always verify against the live HTML.
  • No =, " or newlines inside a key or value. append splits 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.


Prerequisites

  • 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@9

Install

git clone https://github.com/sschwindt/ssc.github.io.git
cd ssc.github.io
pnpm install

Local development

nvm use 24 && pnpm dev          # http://localhost:4321

Useful 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

Editing hints

  • 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). Use pnpm new-post <filename> to scaffold one.
  • public/assets/images/ -- wallpapers, avatar (ssc.png), favicon (hycon.png) and any other static assets.

Deploy

Short version

git add -A && git commit -m "..." && git push   # pushes to main, workflow rebuilds

Background

Deployment is fully automated via .github/workflows/deploy.yml:

  1. Push commits to the main branch.
  2. GitHub Actions installs dependencies, runs pnpm build, writes the CNAME (sebastian-schwindt.org) into dist/, and force-pushes the resulting static site to the gh-pages branch.
  3. GitHub Pages serves gh-pages at 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 domain sebastian-schwindt.org should be set (it is also written into dist/CNAME automatically by the workflow).

Manual deploy (fallback)

If GitHub Actions is unavailable:

pnpm build
echo "sebastian-schwindt.org" > dist/CNAME
npx gh-pages -d dist -b gh-pages -f

Updating dependencies

pnpm up --latest
pnpm install
pnpm build   # sanity-check

When 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).

Credits

About

Home

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors