Migrate site from Preact SPA to Astro static site#39
Merged
Conversation
Replace the single-page Preact app with Astro for static site generation.
Every page is now pre-rendered at build time with zero JS by default.
Interactive features (search, filters, copy, theme toggle) use Preact islands.
New features:
- Separate pages with real URLs: /, /how-it-works/, /api/, /skills/{id}/
- Per-skill SEO: unique meta tags, JSON-LD TechArticle schema, canonical URLs
- Raw markdown endpoints at /skills/{id}.md (text/markdown content type)
- Auto-generated sitemap via @astrojs/sitemap
- 404 page
- Framework SVG icons with light-mode color support
Build: npm run build still works — validate + generate + astro build.
Deploy workflow unchanged — still outputs to dist/ for GitHub Pages.
Contributors only touch SKILL.md files, everything else is automatic.
17 pages built in ~1.3s. ~18kb gzipped JS total.
marc0olo
added a commit
that referenced
this pull request
Feb 27, 2026
Resolve merge conflicts with Astro migration (PR #39) and apply the fake API removal to the new Astro codebase: - Delete ApiTab component and /api/ page entirely - Remove API_ENDPOINTS constant and API tab from navigation - Replace "Your Agent / REST API" framework with "skills.sh / npx skills add" - Update hero, how-it-works terminal example, and CTA to reference real access methods (llms.txt, raw GitHub URLs, skills.sh CLI) - Update footer copy - Keep both README additions (skill page URLs from Astro + CLI row)
This was referenced Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed
Removed:
index.html,vite.config.js,src/app.jsx,src/main.jsx(the entire SPA)Added:
astro.config.mjs— Astro configuration with Preact + sitemap integrationssrc/pages/— Separate pages with real URLs (/,/how-it-works/,/api/,/skills/{id}/)src/layouts/— Shared BaseLayout (meta/SEO) and SiteLayout (header/nav/footer)src/components/— Preact islands for interactive parts (BrowseTab, ApiTab, SkillHeader, etc.)src/data/skills.ts— Build-time skill loader (readsskills/*/SKILL.mddirectly)src/data/site.ts— Central site URL/base path config (change 2 lines to migrate domain).mdendpoints at/skills/{id}.mdwithtext/markdowncontent typeUpdated:
package.json(Astro deps),README.md(tech stack, new features),CLAUDE.md(project structure),.gitignore,robots.txtNew features
<title>,<meta>, Open Graph, JSON-LD TechArticle schema, canonical URLs/skills/ckbtc.mdserves the SKILL.md with proper content type@astrojs/sitemapWhat didn't change
skills/*/SKILL.md— untouchedscripts/— all validation and generation scripts unchanged.github/workflows/deploy.yml— still runsnpm run build, still deploysdist/to GitHub Pagesnpm run validate && npm run generateBuild
Test plan
npm run buildsucceeds/skills/{id}/llms.txt,llms-full.txt,.well-known/agent.jsonall generate correctlyGenerated with Claude Code