← Back to portfolio This Portfolio Site preview
Stack
AstroTypeScriptMarkdownCSS custom properties
Impact
  • Astro 7 + TypeScript + Markdown content collections
  • Dark/light theme with no-flash inline script
  • RSS, sitemap, robots, JSON-LD, OG/Twitter meta
  • Base-path-aware URLs for GitHub Pages hosting
Source View on GitHub → Updated: Sep 16, 2026

This Portfolio Site

Context

A static portfolio was needed where content (projects, posts) is edited in Markdown rather than component markup. Hosting is GitHub Pages as a user site (repository NikitaBoyarkin.github.io, served from the domain root). Deploy is push-triggered, with no manual build.

Hypothesis

If we take Astro with content collections and a Zod frontmatter schema, content and presentation separate: new projects/posts are a new .md file, with no component edits. The base path and meta tags (OG, JSON-LD, sitemap, RSS) are configured once.

Data & Method

Stack: Astro 7, TypeScript, Markdown content collections (src/content/{projects,posts}/), Zod schemas in src/content/config.ts.

Architecture:

  • Content collections — each project/post = Markdown + frontmatter; Zod validates fields at build.
  • Base pathwithBase() from src/lib/path.ts applies base to all internal links and images (the site now serves from the root, base: '/').
  • Theme — an inline <head> script reads localStorage/prefers-color-scheme and sets data-theme before first paint (no flash); CSS custom properties are reactive.
  • SEOsitemap.xml, robots.txt, rss.xml, JSON-LD, OG/Twitter meta, canonical.
  • Deploy — GitHub Actions builds dist/ and publishes to Pages on push to master.

Validation: scripts/check_site.py checks required pages, internal links, the profile image, and assets in index.html.

Findings

Astro content collections with Zod are a contract between content and presentation: invalid frontmatter breaks the build, not the deploy. withBase() encapsulates the GitHub Pages base path — no link hardcodes the base. The “content = .md, presentation = .astro” split means adding a project requires no code changes.

Impact

  • Astro 7 + TypeScript + Markdown content collections — content edited in .md, validated by Zod.
  • Dark/light theme without flash — inline script before first paint.
  • Full SEO — RSS, sitemap, robots, JSON-LD, OG/Twitter meta, canonical.
  • Base-path-aware URLswithBase() for GitHub Pages, no hardcoding.

Documentation

See also

Connection map

Projects, posts and topics connected to this one. Hover a node to see its name; click to open.