Skip to content

Repository files navigation

matecode.dev

The MateCode studio site — a bilingual static landing page, live at matecode.dev.

How it is built

Static, no client framework. Astro renders both locales ahead of time. The only JavaScript that ships is the animation layer, so the page loads on the connections its visitors actually have.

File-based i18n, no /es prefix. Spanish is the default locale and lives at the root; English lives at /en. There is deliberately no redirect from /es — an earlier version of this site broke by sending Spanish traffic to a route that does not exist.

Slashless URLs. trailingSlash: 'never' with build.format: 'file', so /en is served directly with a 200. The directory format would make Netlify's Pretty URLs issue a 301 /en → /en/, which contradicts what the canonical and the sitemap declare.

Brand assets are generated, not committed by hand. scripts/generate-brand-assets.mjs embeds the site's own fonts as base64 and rasterizes one Open Graph plate per locale at build time. The brand kit's own descriptor SVGs are unusable on the web: their wordmark is live <text> in a font that exists only on macOS and silently falls back elsewhere.

Getting started

Requires Node.js 22.12 or newer.

npm install
npm run dev       # development server
npm run build     # production build
npm run preview   # serve the production build

Verification

npm run verify    # build, typecheck, then the full suite

The tests read the built output in dist/, not the source, so they catch what actually ships:

Suite What it guards
test:content Both locales stay in parity — no section present in one and missing in the other
test:seo Canonical, hreflang, and metadata in the rendered head
test:faq FAQ structured data stays valid
test:forms The hidden static form Netlify needs at build time to register the form
test:sitemap Sitemap URLs, hreflang alternates, robots.txt, and llms.txt

Run it before deploying. Several of these exist because the corresponding bug already happened once.

Structure

src/components/   Sections and the pinned showcase
src/content/      Copy and site metadata, per locale
src/layouts/      BaseLayout — head, structured data, shell
src/pages/        index.astro (es) and en/ (en)
src/styles/       Design tokens and layout
scripts/          Brand asset generation, IndexNow ping
public/brand/     Mark, favicons, generated OG plates
tests/            Build-output assertions

Deployment

Netlify builds from main and runs scripts/indexnow.mjs afterwards, which pings Bing on production deploys only and never fails the build. Google is not pinged — it needs manual re-indexing through Search Console.

Form submission notifications are configured in the Netlify UI, not in netlify.toml. That state does not travel with a fork, a rename, or a re-link, so it is worth re-checking after any of those.


Built by MateCode — websites and custom software.

About

Bilingual static studio site for MateCode, live at matecode.dev. Astro, with build-output tests for SEO and locale parity.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages