The best Astro one page template puts every section a visitor needs (offer, proof, details, pricing, contact) on one URL, with an anchor navigation that jumps to each section and a layout that ships almost no JavaScript. Astro suits one-page sites well because each section is just a component, the page builds to a single static HTML file, and smooth scrolling and active-link highlighting need only CSS and a few lines of script.
We sell Astro themes, including many one-page designs, so keep that in mind as you read. This guide covers when a single page is the right call, the free routes, a section and anchor-nav pattern to reuse, and our strongest one-page picks.
Key Takeaways
- A one-page site suits a single offer: a product launch, an event, a freelancer, a small local business.
- Build each section as its own Astro component and give it an
idthat the navigation links to.- Use CSS
scroll-margin-topso a sticky header does not cover section headings.- One URL can rank for one topic. If you need to rank for many services or locations, plan separate pages.
- Free options include AstroWind’s landing layouts and Astro’s official starters; paid one-page themes add finished design and copy structure.
When a one-page site is the right choice
A single page works when the visitor has one decision to make. Typical fits:
- Freelancers and consultants with one core service and a contact form.
- Product and app launches where the page tells one story from problem to sign-up.
- Events and courses with a schedule, speakers or curriculum, and a booking button.
- Small local businesses such as a cafe or studio with hours, a menu or price list, and a map.
It works less well when you have several distinct audiences or services. Search engines rank pages, not sections, so a one-page site competes for one cluster of queries. If you offer five services and want each to be found, give each its own page and keep the homepage as the summary. Our landing page sections guide lists which sections earn their place on a single page.
What a good one-page template includes
Check these before you pick a template:
- Anchor navigation that works on mobile. The menu should close after a tap and land on the right heading.
- A sticky header that does not hide headings. Look for
scroll-margin-topor equivalent offset handling. - Sections as separate components. Reordering or removing a section should be one line in the page file.
- A real contact path. A form, a booking link or an email address, visible near the top and again at the end.
- Legal and utility pages. Even a one-page site needs a privacy page and a 404 page. Many templates include them as extra routes.
Free Astro one-page options
AstroWind
AstroWind is a free Tailwind CSS theme with hero, features, pricing, FAQ and call-to-action widgets. You can compose a one-page site from its landing widgets and drop the multi-page parts you do not need.
Astro’s official starters
The official starters give you a blank, well-structured project in seconds:
# Terminal
npm create astro@latest -- --template minimal
From the minimal starter, a one-page site is a single src/pages/index.astro file and a folder of section components. It is the best route if you have your own design.
The official directory
The Astro themes directory includes free and paid landing and one-page themes. Filter for landing pages, then check how recently each theme was updated.
A one-page pattern you can reuse
Keep each section in its own component, and let the page file decide the order. The navigation links point to section ids:
---
// src/pages/index.astro
import Base from '../layouts/Base.astro';
import Hero from '../components/sections/Hero.astro';
import Services from '../components/sections/Services.astro';
import Work from '../components/sections/Work.astro';
import Pricing from '../components/sections/Pricing.astro';
import Contact from '../components/sections/Contact.astro';
const nav = [
{ id: 'services', label: 'Services' },
{ id: 'work', label: 'Work' },
{ id: 'pricing', label: 'Pricing' },
{ id: 'contact', label: 'Contact' },
];
---
<Base title="Studio Name: design and development">
<header class="site-header">
<nav aria-label="Sections">
{nav.map((item) => <a href={`#${item.id}`}>{item.label}</a>)}
</nav>
</header>
<main>
<Hero />
<Services id="services" />
<Work id="work" />
<Pricing id="pricing" />
<Contact id="contact" />
</main>
</Base>
Each section receives its id as a prop and puts it on a <section> element with a heading. Then two CSS rules handle smooth scrolling and the sticky header offset, and turn smooth scrolling off for visitors who prefer reduced motion:
/* src/styles/global.css */
html {
scroll-behavior: smooth;
}
section[id] {
scroll-margin-top: 5rem; /* height of the sticky header */
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
To highlight the current section in the menu, a small IntersectionObserver is enough. Astro bundles this script and loads it as a module, so it adds only a few hundred bytes:
---
// src/components/ActiveNav.astro
---
<script>
const links = document.querySelectorAll<HTMLAnchorElement>('.site-header a[href^="#"]');
const observer = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (!entry.isIntersecting) continue;
links.forEach((link) =>
link.toggleAttribute('aria-current', link.hash === `#${entry.target.id}`)
);
}
},
{ rootMargin: '-50% 0px -50% 0px' }
);
document.querySelectorAll('section[id]').forEach((section) => observer.observe(section));
</script>
Style a[aria-current] in your header and you have an active state without a framework. For more on when a plain script beats a component island, see island or script. The official pages docs explain how src/pages/ maps to routes.
Paid Astro one-page templates from our catalog
We have one-page designs across many categories. Each is a complete Astro 7 project with TypeScript and a live preview, and builds to static files. A few picks by use case:
OmenFlex: freelancers and consultants
OmenFlex ($39) is a one-page theme for freelancers and consultants, with clean grids and animations for showing work, process and personal brand. It includes license and style guide utility pages.
Advis and Asper: small business and agencies
Advis ($29) is a one-page theme for small businesses, consulting companies, financial firms and agencies. Asper ($39) covers small businesses, marketing agencies and personal portfolios in a single page.
Axeris and Apura: SaaS and apps
Axeris ($29) is a conversion-focused one-page SaaS layout with features, pricing and testimonials. Apura ($29) is a one-page theme for mobile app websites, built to show features and drive downloads.
Amber and Alice: restaurants and cafes
Amber ($29) is a one-page restaurant and cafe theme with the essential sections in place. Alice ($24) is a single-page theme for food and drink businesses.
Akari: course launches
Akari ($39) is a single-page theme for course creators, with curriculum, benefits and pricing sections designed around sign-ups.
Browse the full theme catalog and search for “one page” to see the rest, or read our landing page template roundup if you need a few supporting pages as well.
Before you launch a one-page site
- Replace all demo copy, and make sure each section heading says what the section is.
- Write a specific
<title>and meta description; the whole site depends on them. - Test every anchor link on a phone, including after the mobile menu closes.
- Add a privacy page and a custom 404 page as separate routes.
- Run Lighthouse on the built page with
astro buildandastro preview, not in dev mode.
FAQ
Is a one-page website bad for SEO?
Not inherently. A one-page site can rank well for one topic, such as a business name plus its main service. It struggles to rank for many different queries, because search engines rank pages rather than sections. Add separate pages when you need to target more topics.
How do I make smooth scrolling links in Astro?
Use plain anchor links to section ids and set scroll-behavior: smooth on html in CSS. Add scroll-margin-top to sections if you have a sticky header, and disable smooth scrolling under prefers-reduced-motion.
Can a one-page Astro template have a blog?
Yes. Add a content collection and a src/pages/blog/ route alongside the one-page homepage. The homepage stays a single scrolling page while the blog gives you extra URLs to rank.
What is the difference between a one-page template and a landing page template?
A one-page template is the whole website on one URL. A landing page template is usually one focused page within a larger site, built for a campaign or product. In practice many templates work as both.
Do one-page Astro sites need JavaScript?
Very little. Smooth scrolling is CSS. Highlighting the active menu item or toggling a mobile menu needs a small script, which Astro bundles and loads as a module. No UI framework is required.