Pages, Layouts & Sections
Files: src/pages/[...lang]/, src/layouts/Base.astro · Skill level: Beginner
Veltro assembles routes in src/pages/[...lang]/. All regular pages use src/layouts/Base.astro, which provides the document shell, SEO head, header, footer, global scripts, cursor, and back-to-top control. These files are the same in all three editions, so the order of sections on a page stays in code.
Page Composition
---import Base from "@/layouts/Base.astro";import Banner from "@/components/sections/Banner.astro";import ServicesSection from "@/components/sections/ServicesSection.astro";---
<Base {...homepageContent?.data}> <Banner /> <ServicesSection hasSectionSpacing={true} /></Base>Each section component loads its default entry from src/content/sections/<language>/, and merges a content prop over it if the route passes one. In the Astro edition, only the FAQ page and the banner card on the team and case studies pages pass one. In the Tina edition, more routes do, so those pages’ forms have their own blocks: see What Is Editable In Tina. See Common Customization Examples.
Shared Base Options
Useful Base.astro props include:
fitToScreen: adds the theme’s minimum-screen class; defaults totruefooterSpacingTop: controls top spacing on the footerheaderPosition:fixed,static, orstickyheaderBorderOnScroll: adds the scroll-border behaviorhideOffcanvas: keeps the mobile menu panel on small screens, by defaulthideHeader: leaves the header out, for a page that brings its own top barhasBodyDarkBackground: switches the body surfacehasHeadingFontTernary: applies the configured tertiary heading font
Edit the route file to reorder or remove a section on one page. Edit the shared Markdown entry when the content change should apply everywhere that section is used.