Skip to content

feat: set up Astro landing site with projects, ideas and GitHub Pages deploy - #1

Merged
whatsaaaa merged 2 commits into
mainfrom
fm/landing-astro-setup
Nov 10, 2026
Merged

whatsaaaa merged 2 commits into
mainfrom
fm/landing-astro-setup

Conversation

@whatsaaaa

Copy link
Copy Markdown
Owner

Intent

Yes please proceed with the Astro setup under whatsaaaa.github.io repo, create a temporary home page with your content suggestions and we will improve it later. Also, use Github Actions for deployment

Context: whatsaaaa.github.io is the GitHub Pages user site repository, served at the root https://whatsaaaa.github.io/. It is a personal landing page to showcase the owner's projects, tools and ideas. Project sites from other repos live under it at their own paths (e.g. the form-builder docs at https://whatsaaaa.github.io/form-builder/), so the site must not use a /form-builder path. The suggested content was: a home page; a projects section driven by Astro content collection files (each project a Markdown file with fields like title, description, tags, links and status), with form-builder as the first entry (JSON-defined Formisch forms compiled to typed Valibot schemas; repo https://github.com/whatsaaaa/form-builder, docs https://whatsaaaa.github.io/form-builder/, npm packages @whatsaaaa/form-builder-schema, -affects, -vue, -react); and optional notes or ideas pages. Astro was chosen for fast static output, islands for occasional Vue/React components, content collections and the official GitHub Pages action. The repo is public and Pages is already set to deploy from GitHub Actions.

What Changed

  • Sets up an Astro static site served at the domain root (site: https://whatsaaaa.github.io, with sitemap integration). It adds a shared Base layout, global styles, a home page, a 404 page, /projects/ and /ideas/ index and detail pages, and ProjectCard and StatusBadge components. It also adds a favicon and a robots.txt that allows every path, so project sites under the domain (such as /form-builder/) are not blocked.
  • Adds projects and ideas content collections with Zod-validated frontmatter: title, description, status, tags, links, featured flag and date for projects. The first project entry is form-builder, alongside placeholder entries for a next project and an idea.
  • Adds tooling and automation: ESLint, Prettier, astro check and pnpm scripts. A deploy.yml workflow builds the site with withastro/action on Node 24 and publishes it with actions/deploy-pages on every push to main or on manual dispatch. A ci.yml workflow runs format check, lint, astro check and a build on pull requests. The README now covers development, how to add projects and ideas, and deployment.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: This is a new static Astro site with no user data or auth. Both fixes from round 1 are in place and correct: deploy.yml now passes node-version 24 to withastro/action, matching CI, and robots.txt has the comment the owner asked for with its directives unchanged. Re-reviewing the rest of the files turned up no new defects or conflicts with the intent.

Testing

I built the site with pnpm and served it with astro preview, then drove it in headless Chrome. The home page, the projects index, the form-builder detail page (including its docs, repo and npm links), the ideas index and idea page, and the 404 page all rendered with correct navigation, and the screenshots look visually clean on both desktop and narrow viewports. The top-level /form-builder/ path returns 404, and every sitemap URL sits at the root under /projects/ or /ideas/. In a disposable copy, a project file with invalid frontmatter failed the build with a clear schema error, and a valid new project file was published and listed automatically. The GitHub Actions deploy workflow could not run, because it needs GitHub's runners and the Pages deployment environment; act is not available locally. Its build step is the same astro build that passed here. All scenarios I could drive passed.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Visitor opens the home page at / and sees the placeholder intro, nav (Home/Projects/Ideas) and form-builder as a featured project ✅ pass live home.png; accessibility snapshot of http://localhost:4391/ from astro preview
Visitor clicks the form-builder card and sees its detail page with Documentation (whatsaaaa.github.io/form-builder/), GitHub repo and npm links plus the four packages ✅ pass live project-form-builder.png, project-mobile.png; snapshot link URLs
Visitor browses /projects/ and the ideas pages, all built from the content collections ✅ pass live projects-index.png, ideas-index.png; snapshots of /projects/, /ideas/ and /ideas/placeholder-idea/
Site does not take over the /form-builder path used by the other repo's project site (adversarial) ✅ pass live curl /form-builder/ returned 404; dist has form-builder only under /projects/; sitemap URLs are only at the root, /projects/* and /ideas/*
Unknown URL shows the custom 404 page, which points to the home page, the project list and /form-builder/ ✅ pass live 404.png
Author adds a project Markdown file with an invalid status and no date, and the build fails with a schema error (adversarial) ✅ pass live invalid-project-build.txt (InvalidContentEntryDataError, exit=1)
Author adds a valid project Markdown file, and it appears on /projects/ with its own page ✅ pass live The build in the disposable copy generated /projects/demo-tool/index.html; 'Demo tool' appears in projects/index.html and the sitemap
A push to main deploys the site to GitHub Pages through the GitHub Actions deploy workflow ⏸️ untested no The workflow runs only on GitHub's hosted runners, and its deploy step needs the github-pages environment with an OIDC id-token. Neither exists locally, and act is not installed. The deploy run on G…

Home page (desktop)

form-builder project page (desktop)

form-builder project page (narrow viewport)

Projects index

Ideas index

404 page

Evidence: Build rejects invalid project frontmatter
$ astro build  (invalid project: status "shipped", no date)
[InvalidContentEntryDataError] projects → bad data does not match collection schema.
  status: Invalid option: expected one of "active"|"experimental"|"planned"|"archived"
  date**: **date: Expected type `"date"`, received `"object"`
  Error reference:
    https://docs.astro.build/en/reference/errors/invalid-content-entry-data-error/
exit=
exit=1

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 warning
  • ℹ️ .github/workflows/deploy.yml:22 - The deploy job runs withastro/action@v6 without a node-version input, so production builds use the action's default Node, while CI (ci.yml:21) pins Node 24 and package.json:6 sets engines.node >=22.23.4. If the action's default Node and CI's Node drift apart, a PR can pass CI on 24 and then fail or behave differently in the deploy build. Fix: pass with: node-version: 24 to withastro/action so the build that ships uses the same Node as the build CI checked.
  • ⚠️ .github/workflows/ci.yml:1 - Simplification: the intent asks for GitHub Actions for deployment. This PR-only CI workflow (format check, lint, astro check, build), plus the ESLint/Prettier tooling it runs (eslint.config.js, .prettierrc.json, .prettierignore, and the lint/format devDependencies and scripts in package.json), goes beyond that. It fits the owner's general quality preferences but no requirement in the intent calls for it. Confirm whether to keep it or remove it.
  • ⚠️ astro.config.mjs:10 - Simplification: the @astrojs/sitemap integration, public/robots.txt, and the <link rel="sitemap"> in src/layouts/Base.astro:37 are not required by the intent (home page, projects collection, optional ideas pages, Actions deployment). Because robots.txt sits at the domain root, it also governs crawling of the other repos' project sites, such as /form-builder/. Confirm whether to keep these or remove them.

🔧 Fix applied.
1 warning still open:

  • ⚠️ .github/workflows/ci.yml:1 - Simplification: the intent asks for GitHub Actions for deployment. This PR-only CI workflow (format check, lint, astro check, build), plus the ESLint/Prettier tooling it runs (eslint.config.js, .prettierrc.json, .prettierignore, and the lint/format devDependencies and scripts in package.json), goes beyond that. It fits the owner's general quality preferences but no requirement in the intent calls for it. Confirm whether to keep it or remove it.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Visitor opens the home page at / and sees the placeholder intro, nav (Home/Projects/Ideas) and form-builder as a featured project ✅ pass live home.png; accessibility snapshot of http://localhost:4391/ from astro preview
Visitor clicks the form-builder card and sees its detail page with Documentation (whatsaaaa.github.io/form-builder/), GitHub repo and npm links plus the four packages ✅ pass live project-form-builder.png, project-mobile.png; snapshot link URLs
Visitor browses /projects/ and the ideas pages, all built from the content collections ✅ pass live projects-index.png, ideas-index.png; snapshots of /projects/, /ideas/ and /ideas/placeholder-idea/
Site does not take over the /form-builder path used by the other repo's project site (adversarial) ✅ pass live curl /form-builder/ returned 404; dist has form-builder only under /projects/; sitemap URLs are only at the root, /projects/* and /ideas/*
Unknown URL shows the custom 404 page, which points to the home page, the project list and /form-builder/ ✅ pass live 404.png
Author adds a project Markdown file with an invalid status and no date, and the build fails with a schema error (adversarial) ✅ pass live invalid-project-build.txt (InvalidContentEntryDataError, exit=1)
Author adds a valid project Markdown file, and it appears on /projects/ with its own page ✅ pass live The build in the disposable copy generated /projects/demo-tool/index.html; 'Demo tool' appears in projects/index.html and the sitemap
A push to main deploys the site to GitHub Pages through the GitHub Actions deploy workflow ⏸️ untested no The workflow runs only on GitHub's hosted runners, and its deploy step needs the github-pages environment with an OIDC id-token. Neither exists locally, and act is not installed. The deploy run on G…
  • pnpm install --frozen-lockfile then pnpm build (7 static pages plus sitemap, exit 0)
  • pnpm preview --port 4391 driven with chrome-devtools-axi (Chrome for Testing 157, isolated session): opened /, clicked the form-builder card through to /projects/form-builder/, then opened /projects/, /ideas/, /ideas/placeholder-idea/ and /does-not-exist/
  • curl http://localhost:4391/form-builder/ returned 404, so the site publishes nothing at the other repo's path
  • 500px-wide viewport screenshot of the project page, with a scrollWidth check showing no horizontal overflow
  • Disposable copy in /tmp: added src/content/projects/bad.md (status 'shipped', no date) and ran astro build, which exited 1 with InvalidContentEntryDataError
  • Disposable copy: added a valid demo-tool.md project and ran astro build, which exited 0; /projects/demo-tool/ was generated, listed in projects/index.html and added to the sitemap
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Scaffold an Astro 7 site for the GitHub Pages user site: home page with
placeholder intro and featured projects, /projects and /ideas from typed
content collections (seeded with form-builder and marked placeholders),
404 page, favicon, sitemap and meta tags. Add Prettier and ESLint,
a CI workflow for pull requests and a deploy workflow using
withastro/action and actions/deploy-pages.
@whatsaaaa
whatsaaaa merged commit 2040e38 into main Nov 10, 2026
1 check passed
@whatsaaaa
whatsaaaa deleted the fm/landing-astro-setup branch November 10, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant