Personal developer portfolio and content site.
- Astro
- TypeScript
- MDX
- Cloudflare Workers
- Pagefind
- Vanilla client-side TypeScript
npm install
npm run dev -- --backgroundnpm run format
npm run check
npm run buildnpm run previewPosts:
src/content/posts/
Projects:
src/content/projects/
Markdown and MDX are validated through Astro Content Collections.
src/
├── components/ reusable UI
├── content/ Markdown/MDX
├── data/ curated GitHub project registry
├── layouts/ page/content layouts
├── lib/
│ ├── github/ build-time API client and README processing
│ ├── projects/ project types, loader and selectors
│ ├── posts/ published post selectors
│ └── server/ runtime API logic
├── pages/
│ └── api/ thin HTTP endpoints
└── styles/
Normal pages are statically generated.
Dynamic API routes opt out of prerendering with:
export const prerender = false;- GitHub repository
mainis production- Cloudflare builds and deploys
maintohyde.dev - Non-production branches receive preview deployments
This repository uses an npm minimum release age to reduce exposure to fresh supply-chain compromises.
See .npmrc.
Local server-side secrets belong in:
.dev.vars
Use:
.dev.vars.example
to document required variables.
Top-level pages may be indexed.
Individual project and post pages use noindex and are excluded from the sitemap.
See CONTRIBUTING.md for branching, pull requests, CI, and deployment workflow.
Add repositories to src/data/projects.ts with a unique slug, GitHub repo
URL, and category. Every build fetches repository metadata and the README from
GitHub's default branch. Optional titles, descriptions, tags and status values
in the registry override GitHub metadata. The resulting content collection powers
both project cards and /projects/<slug>/ pages; /projects/ lists all visible,
non-draft projects. Local Markdown/MDX projects remain in src/content/projects/.
Set GITHUB_TOKEN in the build environment (or a local .env file) to use
authenticated GitHub API limits. It is only used during content loading. Missing
READMEs produce an empty body; other GitHub errors fail the build rather than
publishing incomplete content.
Run the README rendering regression checks with:
npm test- Page and card selectors read build-time collections. Fetch new external content in a loader, never from a card or browser script.
- Project categories and statuses live in
src/lib/projects/types.ts; the shared collection schema validates both local and GitHub projects. Add a category's icon insrc/lib/projects/icons.tswhen extending the category list. - GitHub projects belong only in
src/data/projects.ts. Local project metadata belongs only in its Markdown/MDX frontmatter. Slugs must be unique across both. - Posts use the same published-content selector for the homepage, list and routes. Drafts never generate pages or cards.
- Cloudflare serves prerendered pages from
dist/client. Only/api/healthruns per request. Keep new pages static unless they require request-time data. - Pagefind's internal search assets are generated in
dist/client/pagefindso they are deployed with the site. This does not change external indexing: individual post/project pages retainnoindexand sitemap exclusions. npm testruns offline regression tests.npm run buildperforms type checking, fetches current GitHub content, builds pages and generates the search index. CI supplies its read-only GitHub token; configureGITHUB_TOKENseparately in Cloudflare's build environment. Runtime.dev.varsis not a build-token source.