pawelcislo.com

April 27, 2026 Β· View on GitHub

Cloudflare License: CC BY-NC-SA 4.0

Personal website and blog of PaweΕ‚ CisΕ‚o.

Migrated from WordPress to Astro Starlight and hosted on Cloudflare Pages.

πŸ“‚ Project Structure

Inside of your Astro + Starlight project, you'll see the following folders and files:

.
β”œβ”€β”€ .github/workflows/          # GitHub Actions (yearly rebuild)
β”œβ”€β”€ plugins/                    # Custom remark/rehype plugins
β”œβ”€β”€ public/                     # Static assets served as-is (favicon, linked images, etc.)
β”œβ”€β”€ scripts/                    # Utility scripts (sync recommendations, link checker, etc.)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/                 # Optimised assets (processed by Astro)
β”‚   β”œβ”€β”€ components/             # Custom Astro components (Footer, PageTitle, ThemeSelect, etc.)
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   └── docs/
β”‚   β”‚       β”œβ”€β”€ knowledge/      # Knowledge base pages (Obsidian, Espanso, etc.)
β”‚   β”‚       β”œβ”€β”€ pages/          # Legacy subfolder (images only)
β”‚   β”‚       └── posts/          # Blog posts with images
β”‚   β”œβ”€β”€ content.config.ts       # Content collection schema
β”‚   β”œβ”€β”€ pages/                  # Custom Astro pages (404, RSS, tags)
β”‚   β”‚   └── tags/               # Tag index and individual tag pages
β”‚   └── styles/                 # Custom CSS overrides
β”œβ”€β”€ .editorconfig               # Editor formatting rules
β”œβ”€β”€ .gitattributes              # Enforces LF line endings & marks binary files
β”œβ”€β”€ .nvmrc                      # Pins the Node.js version
β”œβ”€β”€ astro.config.mjs            # Site configuration
β”œβ”€β”€ COPYRIGHT                   # Content copyright notice
β”œβ”€β”€ package.json                # Dependencies and scripts
β”œβ”€β”€ README.md                   # This file
└── tsconfig.json               # TypeScript configuration

Content organization:

  • Starlight looks for .md or .mdx files in the src/content/docs/ directory
  • Each file is exposed as a route based on its file name
  • Blog posts are in src/content/docs/posts/ (auto-generated in sidebar)
  • Top-level pages (Portfolio, FAQ, Uses, etc.) live directly in src/content/docs/
  • Images are in src/content/docs/posts/images/ and src/content/docs/pages/images/

πŸ‘¨πŸ»β€πŸ’» Getting Started

  1. Install Node.js from nodejs.org (includes npm)
  2. Install dependencies: npm install
  3. Start development server: npm run dev

πŸ’Ύ Commands

All commands are run from the root of the project, from a terminal:

CommandAction
npm installInstalls dependencies
npm run devStarts local dev server at localhost:4321
npm run buildBuild your production site to ./dist/ (auto-syncs recommendations page)
npm run previewPreview your build locally, before deploying
npm run sync:recommendationsSync recommendations page from GitHub
npm run check:linksAudit all content pages for broken/outdated external links (pass a path to limit, e.g. npm run check:links -- posts/)
npm run check:editorconfigCheck files against .editorconfig rules (trailing whitespace, final newline, line endings)
npm run typecheckRun astro check to validate Astro/TS/MDX types and content frontmatter
npm run verifyRun all pre-push checks: typecheck + check:editorconfig + build
npm updateUpdates packages within semver ranges
npm outdatedShows which packages have newer versions
npm run astro ...Run CLI commands like astro add, check
npm run astro -- --helpGet help using the Astro CLI

πŸš€ Deployment

This site is deployed on Cloudflare Pages with automatic deployments from GitHub.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     git push     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     webhook     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ VS Code β”‚ ───────────────► β”‚ GitHub  β”‚ ──────────────► β”‚ Cloudflare Pages β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                                  β”‚
                                                            npm run build
                                                                  β”‚
                                                                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       CDN       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   static   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Visitors β”‚ ◄────────────── β”‚ Edge Network β”‚ ◄───────── β”‚    Astro SSG    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Deployment flow:

  1. Push changes to the main branch
  2. Cloudflare Pages automatically builds and deploys
  3. Preview the main branch build at pawelcislo.pages.dev
  4. Changes are live at pawelcislo.com

Before pushing, run the combined verification script:

npm run verify

This runs, in order:

  1. npm run typecheck β€” validates Astro/TS/MDX types and content frontmatter (fast fail)
  2. npm run check:editorconfig β€” checks trailing whitespace, final newlines, line endings
  3. npm run build β€” the same pipeline Cloudflare runs (including the recommendations sync)

If all three pass, the push should deploy cleanly.

Additionally, a GitHub Actions scheduled workflow triggers a Cloudflare rebuild on January 1st each year to update the copyright year in the footer.

πŸ“š Resources


Built with Starlight