# Homepage Variants

## Homepage Variants

Techbyte ships with two homepage variants. This is one of the first places users get confused, because each homepage has:

- its own page file
- its own homepage entry in `src/content/homepage/<language>/`
- its own section composition
- its own header and footer layout

### Home 01 — Light header, hero slider

<div class="border border-dark">![Techbyte Home 01](/images/techbyte/home.png)</div>

- Page file: `src/pages/[...lang]/index.astro`
- Content entry: `src/content/homepage/<language>/-index.md`
- Uses the default `headerLayout` (`header-1`) and `footerLayout="footer-1"` (contact section above the footer)
- Opens with a full-width hero slider (`hero-section.md` slides)

### Home 02 — Dark header, announcement bar

<div class="border border-dark">![Techbyte Home 02](/images/techbyte/home-two.png)</div>

- Page file: `src/pages/[...lang]/home-two.astro`
- Content entry: `src/content/homepage/<language>/home-two.md`
- Uses `headerLayout="header-2"` and the default footer (`footer-2`)
- A bold statement hero with social links, and the announcement in the top bar

### How The Homepage Files Work

Each homepage imports a different stack of section components. Example:

```astro
// src/pages/[...lang]/home-two.astro
<Base {...page?.data} headerLayout="header-2" footerSpaceTop={true}>
  <HeroSectionTwo />
  <CTAVideoSection hasSectionSpacingTop={false} />
  <FeaturesGridTwo hasSectionSpacingBottom={true} />
  <AboutSectionTwo hasSectionSpacingBottom={true} />
  <ServicesSectionTwo hasSectionSpacingBottom={true} />
  <!-- and the other sections -->
  <TeamSection hasSectionSpacingBottom={true} badgeVariant="secondary" />
</Base>
```

That means changing a homepage usually involves two layers:

1. updating the page-level content entry in `src/content/homepage/...`
2. updating the individual section content files in `src/content/sections/...`

### Important Detail: Homepage Content Files Are Thin

The homepage content files (`-index.md`, `home-two.md`) contain page-level metadata: the title and the meta description.

The actual visible homepage content comes from reusable section entries. Home 02 mostly uses the `-two` variants of each section:

- `src/content/sections/english/hero-section.md` / `hero-section-two.md`
- `src/content/sections/english/about-section.md` / `about-section-two.md`
- `src/content/sections/english/services-section.md` / `services-section-two.md`

So if you update only `src/content/homepage/english/home-two.md`, you will not see section copy change. You need to update the matching section file instead.

### Shared Sections

Some sections are shared between both homepages with different props — for example `StatsSection` renders with `hasMainBg={true}` on Home 01 and `halfBackground={{ enable: true }}` on Home 02, and `CTAGallerySection` closes both pages (with `variant="secondary"` on Home 02).

### In The Tina And Sanity Editions

In the Tina edition, the homepages are **Home pages > Home 1** and **Home two** at `/admin/`, and the section content is under **Section defaults**. A block in a homepage's form changes that section on that homepage only. In the Sanity edition, they are **Homepages > Home 1** and **Home 2** in the Studio, which hold only the title and meta description. The visible text is under **Sections**. See [Editable In Tina](../../features/what-is-editable-tina/) and [Editable In Sanity](../../features/what-is-editable-sanity/).

### Safe Editing Workflow

If you want to change a homepage safely:

1. Open the relevant page file in `src/pages/[...lang]/`
2. Note the imported section components and the props passed to them
3. Edit the corresponding `src/content/sections/<language>/...` files first
4. Only edit the Astro section component if you need structural or styling changes