The website for My Climate Definition, a climate blog published on Medium. The homepage shows the latest Medium stories, and the site rebuilds itself from the Medium feed twice a day.
- App: React 18 and TypeScript, built with Vite and styled with Tailwind CSS (
src/). Routes:/,/aboutand/contact. - Static pages: everything in
public/is copied into the build unchanged: the HTML pages, post previews, CSS, service worker and web manifest. - Deploy:
.github/workflows/pages.ymlruns on every push tomain, every 12 hours and on demand. Each run:- Fetches the Medium RSS feed and writes
public/posts.json(scripts/build_posts.py). - Generates icons, the web manifest,
sitemap.xmlandrobots.txt(scripts/gen_*.py). - Type-checks and builds the site into
dist/(npm run build). - Adds a
404.htmlfor client-side routes and theCNAME, then deploysdist/to GitHub Pages atmyclimatedefinition.org.
- Fetches the Medium RSS feed and writes
dist/ in the repository is an old build; the workflow rebuilds it on every deploy.
Requirements: Node.js 22 and Python 3.
npm ci
npm run dev # http://localhost:3000
npm test # Vitest
npm run build # type-check and build into dist/To pull the latest posts from Medium:
python3 -m pip install -r requirements.txt
npm run sync:postsGitHub turns off scheduled workflows in a public repository after 60 days without activity. If new stories stop appearing on the site, open Actions → Build & Deploy (React + Medium) and click Enable workflow, or run it once with Run workflow.
src/ React app: pages, components, post loading (lib/posts.ts)
public/ static pages and assets, copied into the build
scripts/ Medium sync, icons, manifest, sitemap, post previews
config/site.json newsletter form target used by scripts/generate_previews.py
.github/workflows/ build and deploy to GitHub Pages
See LICENSE.