5 min readUpdated: November 24, 2026

Why I'm Using Astro for Landing Pages and Blogging (and You Should Too)

Astro fits content-first marketing sites: HTML by default, content collections, built-in images, and optional islands. Here is the Astro 7 setup I would use now.

Available in:

I already wrote about choosing Angular for the main app. The marketing site had a different job: publish content, load quickly, and stay out of my way.

In the original April 9, 2026 post, I described a blank repository, a day spent trying Strapi, and a first Astro build that finished in seven seconds. Those are dated personal observations, not universal setup or build times.

The conclusion held up: Astro is a good fit for this content-first part of the stack.

“The best marketing stack is the one that lets me publish without rebuilding a CMS in my head.”

The Three Options

  1. Strapi: useful when non-technical editors need an admin UI. For a one-person blog, it added a service and a publishing workflow I did not need.
  2. Custom HTML/CSS: fast to start, but index pages, RSS, drafts, translations, and image optimization become your maintenance tax.
  3. Astro: content collections, build-time rendering, and islands without imposing a client-side application framework.

If you have a content team, a headless CMS can be the right answer. My choice was about team size, not a verdict on CMSs.

What “Zero JavaScript by Default” Actually Means

An .astro component ships no framework runtime unless you add client-side code:

---
import PricingCalculator from './PricingCalculator.tsx';
---

<div class="pricing-section">
  <PricingCalculator client:visible />
</div>

The rest of the page can remain HTML and CSS. client:visible is better than client:load for a calculator below the fold because its JavaScript is not requested until it is needed.

But the whole site is not automatically zero-JavaScript. View transitions, Mermaid, analytics, video embeds, and interactive islands all add client code. Astro gives you control; you still need a performance budget.

Astro 7 Content Collections

Our landing repository uses Astro ^7.4.13 and defines the blog in src/content.config.ts:

import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';

const blog = defineCollection({
  loader: glob({
    base: './src/content/blog',
    pattern: '**/*.{md,mdx}',
  }),
  schema: z.object({
    title: z.string(),
    description: z.string(),
    pubDate: z.coerce.date(),
    updatedDate: z.coerce.date().optional(),
    tags: z.array(z.string()),
  }),
});

export const collections = { blog };

Astro validates the frontmatter and generates TypeScript types. It does not create your index pages, RSS feed, drafts filter, or search index automatically—those are routes you write.

The Content Layer also supports live collections in src/live.config.ts, but they require on-demand rendering and trade away runtime MDX rendering and build-time image optimization.

Comparison of Astro, a headless CMS, and custom HTML for setup complexity, publishing workflow, and maintenance

Images, Fonts, and Tailwind Are Built In Now

The old advice to install @astrojs/image is obsolete. Astro provides <Image /> and <Picture /> through astro:assets; local images are processed at build time, while public/ images are served as-is.

The Fonts API can download and self-host fonts, generate fallbacks, and add preload hints. Preload only the fonts a page actually needs.

For Tailwind v4, use the Vite plugin:

npm install tailwindcss @tailwindcss/vite
// astro.config.mjs
import { defineConfig } from 'astro/config';
import tailwindcss from '@tailwindcss/vite';

export default defineConfig({
  vite: { plugins: [tailwindcss()] },
});
/* src/styles/global.css */
@import "tailwindcss";

@theme {
  --color-brand: oklch(0.75 0.18 175);
}

Import the stylesheet in your layout. The old @astrojs/tailwind integration is for Tailwind v3; npx astro add tailwind installs the v4 Vite plugin on current Astro versions.

i18n Routing Helps, but Does Not Translate the Site

// astro.config.mjs
export default defineConfig({
  i18n: {
    defaultLocale: 'en',
    locales: ['en', 'ru', 'vi'],
    routing: { prefixDefaultLocale: false },
  },
});

Create src/pages/ru/ and src/pages/vi/ for localized routes. Use getRelativeLocaleUrl() from astro:i18n for links. English stays at /blog/; Russian and Vietnamese use /ru/blog/ and /vi/blog/.

Astro does not automatically create translated pages, hreflang tags, or a language switcher. Astro.preferredLocale is for on-demand rendering; prerendered pages use Astro.currentLocale.

Search, Pagination, and Deployment

Astro has no built-in site search. For a small blog, a build-time JSON index plus a lightweight client-side filter is a reasonable choice. A hosted search service is also valid when the content grows.

Pagination is application code, not a rigid built-in “ten posts per page” system. Write it against your collection and design instead of fighting an imaginary default.

This repository deploys static dist/ output to Cloudflare Pages with Wrangler. A purely static Astro site does not need an adapter. If you opt into on-demand rendering, install the adapter for your host.

The Cost of Admission

  • Astro is not my choice for a highly interactive dashboard.
  • Third-party scripts can erase the JavaScript savings.
  • Search, forms, and analytics remain your responsibility.
  • Major upgrades require testing. Astro 7 moved to Vite 8, made the Rust compiler and Sätteri Markdown pipeline defaults, and changed HTML whitespace handling.

I removed “it never breaks.” What is true is narrower: this static content stack usually stays quiet between deliberate dependency updates and publishing changes.

The Verdict

For QuotyAI’s landing pages and blog, Astro is the right tool. I can edit text in a component, publish MDX, and keep most pages as HTML.

If your site is mostly an application, choose an application framework. If your site is mostly content, Astro deserves the first look.

Frequently Asked Questions

Why choose Astro for a marketing site? Astro renders HTML by default and lets you hydrate only the interactive parts. That is a good fit for landing pages and blogs, where most content does not need a client-side framework. It reduces JavaScript overhead, but images, third-party scripts, and poorly chosen islands can still make a site slow.

How does Astro 7 handle content collections? Define a build-time collection in src/content.config.ts with a loader such as glob() and a Zod schema from astro/zod. Astro validates frontmatter and generates types. Routes, RSS feeds, draft filtering, and search indexes still need application code.

Does Astro’s i18n routing generate SEO tags and language switchers? No. Astro computes localized routes and provides helpers such as getRelativeLocaleUrl(), but you must create the locale pages, translated content, hreflang tags, and language-switcher UI. Browser language detection applies to on-demand rendering, not prerendered pages.

What are the tradeoffs of Astro? Astro is strongest for content-first sites, not highly interactive applications. You still own search, forms, analytics, accessibility, and performance budgets. Major upgrades can require changes, especially when a project depends on Vite internals or older integrations.

Sources


Tags: astro web-development frontend solo-founder marketing-site

Found this useful? Share it.

Related articles