Homepage Variants
Files: src/pages/[...lang]/index.astro, src/pages/[...lang]/home-two.astro, src/content/sections/<language>/ · Skill level: Beginner
Veltro has two routed homepage layouts.
Home 01
- Route:
/ - Page file:
src/pages/[...lang]/index.astro - Page content:
src/content/homepage/<language>/-index.md
Section order:
BannerAboutOneServicesSectionPortfolioSectionSolutionStepsSectionTestimonialSectionCustomersCallToActionCaseStudiesSectionIndustriesSectionContactSectionBlogSection
Home 02
- Route:
/home-two/ - Page file:
src/pages/[...lang]/home-two.astro - Page content:
src/content/homepage/<language>/home-two.md
Section order:
BannerTwoRoadmapSectionCustomersProcessSectionServicesSectionTwoPortfolioSectionTwoTestimonialSectionTwoVideoSectionAwardSectionTeamSectionBlogSectionTwo
Editing Workflow
- Open the homepage route and identify its imported sections.
- Edit the matching file in
src/content/sections/<language>/. - Edit the Astro section only when the structure or design must change.
The homepage files hold the page’s title and search details.
- Astro: the text you see comes from the section files. The section blocks in the homepage files, such as
servicesSection, have no effect, because the routes don’t read them. To use one, pass it to the section in the route:<ServicesSection content={homepageContent?.data.servicesSection} />. - Tina: Home pages holds
-indexfor Home 01 andhome-twofor Home 02. The routes read the blocks in these forms, so a block you fill in changes that section on that homepage only. See What Is Editable In Tina. - Sanity: Homepages holds Home 1 and Home 2, with the title and search details. The rows under Sections on this page have no effect there. Edit the section under Sections. See What Is Editable In Sanity.