Building Journey ยท Part 5 of 10

110 Pages, Zero Lines of Code: How My Site Was Built

The architecture deep dive: how Astro, MDX, and Tailwind CSS work together to turn 21 content files into 110 pages. Explained by a civil engineer.

FengHu222 Published: February 6, 2026

110 Pages, Zero Lines of Code: How My Site Was Built

Part 5 of โ€œA Civil Engineerโ€™s Website Building Diary.โ€ This is the architecture deep dive.


Building a Website Like Building a Building

As a structural engineer, I found a surprising overlap between constructing buildings and constructing websites:

ConstructionWeb Development
BlueprintsTech stack (Astro/MDX/Tailwind)
FoundationProject skeleton (directory structure)
Load-bearing structureLayout system
Prefabricated partsComponents
Interior finishCSS styling
Room zoningPage routing
Plumbing & electricalSEO infrastructure
FurnitureContent (articles/videos)

This mental model made everything click for me.


The Tech Stack (In Plain English)

Astro 5.x โ€” The Foundation

Astro is a static site generator. It takes your content files and converts them into pure HTML pages. Why this matters: Googleโ€™s crawlers love static HTML. It loads fast, is easy to parse, and ranks well.

Think of it as prefabricated construction โ€” all pages are manufactured in advance, ready to serve instantly.

MDX โ€” The Content Format

MDX = Markdown + Components. You write articles using simple Markdown syntax (# for headings, - for lists, ** for bold), but can also embed interactive modules like video players or newsletter signup forms.

All 9 blog articles and 12 video pages are MDX files. Writing them feels like writing notes, not code.

Tailwind CSS โ€” The Styling

A utility-first CSS framework with thousands of predefined style classes. Instead of writing custom CSS (which I canโ€™t do), you add class names like text-blue-600 font-bold to elements. Cursor handles this entirely.


Project Structure

src/
โ”œโ”€โ”€ components/          # 10 reusable UI modules
โ”‚   โ”œโ”€โ”€ Header.astro
โ”‚   โ”œโ”€โ”€ Footer.astro
โ”‚   โ”œโ”€โ”€ Sidebar.astro
โ”‚   โ”œโ”€โ”€ Newsletter.astro
โ”‚   โ”œโ”€โ”€ Breadcrumb.astro
โ”‚   โ”œโ”€โ”€ SEO.astro
โ”‚   โ”œโ”€โ”€ ArticleCard.astro
โ”‚   โ”œโ”€โ”€ VideoCard.astro
โ”‚   โ”œโ”€โ”€ LatestVideos.astro
โ”‚   โ””โ”€โ”€ YouTubeEmbed.astro
โ”œโ”€โ”€ config/              # Configuration
โ”‚   โ”œโ”€โ”€ taxonomy.ts      # 8 categories + 69 tags
โ”‚   โ””โ”€โ”€ youtube.ts       # Channel settings
โ”œโ”€โ”€ content/             # All content
โ”‚   โ”œโ”€โ”€ blog/            # 9 articles (MDX)
โ”‚   โ”œโ”€โ”€ videos/          # 12 video pages (MDX)
โ”‚   โ””โ”€โ”€ config.ts        # Collection schemas
โ”œโ”€โ”€ layouts/             # Page templates
โ”‚   โ”œโ”€โ”€ BaseLayout.astro
โ”‚   โ””โ”€โ”€ BlogPost.astro
โ”œโ”€โ”€ pages/               # Routes
โ”‚   โ”œโ”€โ”€ index.astro
โ”‚   โ”œโ”€โ”€ blog/
โ”‚   โ”œโ”€โ”€ videos/
โ”‚   โ”œโ”€โ”€ topic/
โ”‚   โ””โ”€โ”€ ... (about, privacy, etc.)
โ”œโ”€โ”€ styles/global.css
โ””โ”€โ”€ utils/date.ts

Every folder has a clear, single responsibility. Like a well-organized blueprint.


10 Components = 10 Building Blocks

Components are reusable page modules โ€” designed once, used everywhere.

ComponentPurposeAppears On
HeaderTop navigation with logoAll pages
FooterCopyright, linksAll pages
SidebarCategories, recent contentArticle/list pages
NewsletterKit email signup embedArticle/video bottoms
BreadcrumbNavigation trailAll sub-pages
SEOMeta tags, JSON-LD, Open GraphAll pages (invisible)
ArticleCardArticle preview cardList pages, homepage
VideoCardVideo thumbnail cardVideo list, homepage
LatestVideosRecent video listSidebar, homepage
YouTubeEmbedYouTube iframe playerVideo detail pages

10 components. Infinite combinations. Every page on the site is assembled from these building blocks.


21 Files โ†’ 110 Pages

Astroโ€™s Content Collections feature is the magic multiplier.

I created 21 content files (9 blog + 12 video MDX files). Astro automatically generates:

Page TypeCountHow Generated
Homepage1Manual
Blog articles9From blog/ MDX files
Blog list1Auto-generated
Blog tag pages~20Auto from tags
Video pages12From videos/ MDX files
Video list1Auto-generated
Video category/tag pages~50Auto from categories/tags
Topic hub pages~10Auto from taxonomy
Static pages4Manual (about, privacy, etc.)
Total~110

The content-to-page multiplication is powerful. Write 21 files, get 110 pages. Each with proper SEO, navigation, and structured data.


SEO Infrastructure

The invisible layer that makes Google happy:

Sitemap

Auto-generated at /sitemap.xml on every build. Submitted to Google Search Console. Lists every page on the site.

robots.txt

Directs search engine crawlers โ€” which pages to index, which to skip.

JSON-LD Structured Data

Every page includes structured data telling Google:

  • Article pages: title, author, publish date, category
  • Video pages: name, duration, thumbnail, upload date
  • All pages: breadcrumb hierarchy

Open Graph Tags

Social sharing metadata โ€” when someone shares a link on Twitter or Facebook, it automatically displays the title, description, and preview image.


Key Design Decisions

Pure static mode. All pages pre-built as HTML. No server-side rendering needed. Hosted free on Cloudflare Pages. Fastest possible load times.

Strict taxonomy. 8 categories and 69 tags defined in taxonomy.ts with type checking. Prevents typos and inconsistencies. Like a materials specification document in construction โ€” every material is pre-defined.

Content-driven architecture. The site structure is determined by content, not by manual page creation. Add an article โ†’ tag/category/list pages update automatically.


Summary for Non-Technical Readers

  1. Astro converts content into Google-friendly HTML pages
  2. MDX lets you write articles like notes
  3. Tailwind makes the site look professional
  4. 10 components combine like Lego to form all pages
  5. 21 content files automatically generate 110 pages
  6. SEO infrastructure helps Google find and understand your content

My role in all of this: describe โ†’ choose โ†’ verify โ†’ adjust.

Code written by me: zero.


Next: How AI helped me write 9 SEO-optimized English articles (as someone who can barely write English).

Site: https://www.moneytipshub.com/