8000 gmadar (Gilad Madar) · GitHub
[go: up one dir, main page]

Skip to content
View gmadar's full-sized avatar

Block or report gmadar

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
gmadar/README.md

gmadar.com

Personal site: career timeline, side projects, and the blog (12 posts migrated from the old Jekyll site, 2012–2014). Static Astro site, deployed to Cloudflare Workers as static assets.

Develop

Needs Node 24 (Astro 7 requires ≥ 22.23.4). The version is pinned in .nvmrc.

nvm use
pnpm install
pnpm dev            # http://localhost:4321
pnpm preview:cf     # build + serve through Wrangler (tests _redirects and the 404 page)

Edit content

What Where
Bio, jobs, side projects, links src/data/career.ts
Blog posts src/content/blog/<slug>.md

A new post needs only front matter like this. The file name becomes the URL (/blog/<slug>/).

---
title: "My new post"
date: 2026-11-20T09:00:00+02:00
description: "Optional. Used for search results and link previews."
---

URLs kept from the old site

  • Old post URLs (/svn-vs-git/) return a 301 to /blog/svn-vs-git/ via public/_redirects. Astro also writes a meta-refresh page at each old path as a fallback.
  • The RSS feed stays at /feed.xml.

If you add a post, you don't need to touch _redirects. It only covers the 12 legacy URLs.

Deploy

One-off from your machine

pnpm exec wrangler login
pnpm run deploy     # astro build && wrangler deploy

This creates a Worker named gmadar and prints a *.workers.dev preview URL.

Or on every push (after the code is on GitHub): Cloudflare dashboard → Workers & Pages → Create → Import a repository. Build command pnpm build, deploy command npx wrangler deploy. .nvmrc pins Node 24. If the build fails with "Node.js … is not supported by Astro", add a build variable NODE_VERSION = 24.

Move gmadar.com from GitHub Pages to Cloudflare

Until the move, the apex domain points at GitHub Pages (served from this repo), and www has no DNS record.

  1. In Cloudflare, add gmadar.com as a site, then switch the nameservers at your registrar to the two Cloudflare gives you.
  2. In Cloudflare DNS, delete the old GitHub Pages A records (192.30.252.153 and 192.30.252.154) if they were imported. A Worker custom domain can't be added while other records exist for that hostname.
  3. Deploy once (above). Then go to Workers & Pages → gmadar → Settings → Domains & Routes → Add → Custom domain, and add gmadar.com. Add www.gmadar.com too, plus a redirect rule (Rules → Redirect Rules) sending www to the apex.
  4. In this repo on GitHub, turn off Pages (Settings → Pages), then delete the root CNAME file. Until then, that file keeps GitHub Pages holding the domain, so nobody else can claim it while DNS still points at GitHub.
  5. Check that https://gmadar.com/svn-vs-git/ redirects to /blog/svn-vs-git/ and that /feed.xml loads.

The site's "today" marker and job durations are computed at build time, so redeploy now and then to keep them current.

Popular repositories Loading

  1. MongoDB-backup-to-Amazon-S3 MongoDB-backup-to-Amazon-S3 Public

    creates a MongoDB dump and uploads it to Amazon S3 with Daily + Weekly + Monthly backups

    Shell 12 2

  2. MySQL-backup-to-Amazon-S3 MySQL-backup-to-Amazon-S3 Public

    Forked from woxxy/MySQL-backup-to-Amazon-S3

    Backup daily/weekly/monhtly all your MySQL databases to Amazon S3 via SH and s3cmd

    Shell 1

  3. a-tracktor a-tracktor Public

    Forked from sad-systems/a-tracktor

    The Javascript library contains a set of widgets to visualize audio data on a web page.

    TypeScript 1

  4. FileDownloader FileDownloader Public

    A file downloader react component

    TypeScript 1

  5. json-server json-server Public

    Forked from typicode/json-server

    Get a full fake REST API with zero coding in less than 30 seconds (seriously)

    JavaScript

  6. swagger-node swagger-node Public

    Forked from swagger-api/swagger-node

    Swagger module for node.js

    JavaScript

0