This project contains the source code for Mark Sayson's personal blog: https://www.marksayson.com/
Astro generates the static site from the Markdown posts in _posts/.
Image sources live in src/assets/images/ so Astro can optimize them; the
build also copies originals to the existing /images/ URLs for compatibility.
The Markdown pipeline translates legacy Jekyll block attributes to HTML classes,
preserving table and image formatting.
- Clone this repository to your preferred directory.
- Install Node.js 22.12 or newer.
- Run
npm cito install the locked dependencies.
Run npm run dev and open the local URL printed by Astro. Changes to posts,
styles, images, and shared includes are regenerated during development.
- Run
npm run buildto generate the static site and Pagefind search index indist/. - Run
npm run previewto preview the production build locally. - Run
npm testto build the site, check generated files, and run browser tests against the production preview. Playwright runs Chromium; install its browser once withnpx playwright install chromium. - Search is available at
/search/and indexes blog post content. The Pagefind index is generated as the final build step; it is not available in the development server untilnpm run buildhas run.
Cloudflare Pages can continue serving the site on the existing domain. Set its
build command to npm run build and its build output directory to dist.
Cloudflare Pages installs dependencies from package-lock.json; if dependency
installation is configured in the build command, use npm ci && npm run build.
The generated _headers and _redirects files preserve the current response
headers and legacy URL redirects.
Use npm update to update dependencies and npm run build to validate the
result. Commit the updated package-lock.json together with dependency changes.