# Customizing Layouts

## Customizing Layouts

In every edition, which sections a page has, and their order, stay in `src/pages/[...lang]/`. In the Tina edition, a section's content is under **Section defaults** at `/admin/`. In the Sanity edition, it is under **Sections** in the Studio.

Techbyte is built from reusable sections. Most pages are assembled by importing section components in `src/pages/[...lang]/...` files, while each section reads its default content from `src/content/sections/<language>/`.

- **Layout files:** `src/layouts/components/sections/`
- **Content files (Markdown):** `src/content/sections/<language>/`

For example, if you want to change the "About" section on the homepage, there are two layers involved:

1. The page layout that includes the section
2. The section content Markdown file

### Customizing the Section Markdown File

#### Step 1: Locate the page layout file

The main homepage file is:

- `src/pages/[...lang]/index.astro`

Techbyte also includes other page entry files such as:

- `src/pages/[...lang]/home-two.astro`
- `src/pages/[...lang]/about.astro`
- `src/pages/[...lang]/contact.astro`

#### Step 2: Find the section in the layout file

Open the page file and look for the section imports and render calls:

```astro
// src/pages/[...lang]/index.astro
<Base
  {...page?.data}
  preloadImage={preloadImage}
  footerLayout="footer-1"
  fitToScreen={false}
  footerSpaceTop={false}>
  <HeroSection hasSectionSpacingTop={false} />
  <FeaturesGrid />
  <AboutSection hasSectionSpacingBottom={true} />
  <ServicesSection hasSectionSpacingBottom={true} />
  <CooperationStepsSection hasSectionSpacingBottom={true} />
  <PopularSkillsSection />
  <StatsSection hasSectionSpacingTop={false} hasMainBg={true} />
  <ProjectsSection hasSectionSpacingBottom={true} />
  <TestimonialSection />
  <FaqSection hasSectionSpacingBottom={true} />
  <BlogSection />
  <BrandLogos hasSectionSpacingBottom={true} />
  <CTAGallerySection hasSectionSpacingBottom={true} />
</Base>
```

From this, you can see which component controls each homepage block. Sections accept spacing and appearance props such as `hasSectionSpacingTop`, `hasSectionSpacingBottom`, `hasMainBg`, `halfBackground`, `variant`, and `badgeVariant` to tune their look per page.

#### Step 3: Modify the Markdown file

Next, open the related section content file. Section files use kebab-case names matching their component, for example:

- `HeroSection.astro` → `src/content/sections/english/hero-section.md`
- `AboutSection.astro` → `src/content/sections/english/about-section.md`
- `AboutSectionTwo.astro` → `src/content/sections/english/about-section-two.md`

Example frontmatter from the hero slider:

```yaml
---
enable: true
slides:
  - image: "/images/banner/banner-1.png"
    alt: "Professional IT consultation"
    title: "Managed IT<br/>Services Focused<br/>On Your Success"
    description: "Reliable support, secure systems, and practical technology guidance for growing teams."
    button:
      enable: true
      label: "See Our Projects"
      url: "/projects"
      variant: "fill"
      hoverEffect: "creative-fill"
stats:
  - prependValue: "+"
    value: "60"
    label: "Daily Support Requests Resolved"
---
```

To hide most sections, set `enable: false`. To change the copy or artwork, update the frontmatter fields. A few fields do nothing because no component reads them, such as `enable` on the two features grids. To hide those two, remove their tags from the page file.

### Customizing the Section Layout File

For deeper structural changes, edit the section component itself:

1. Open `src/layouts/components/sections/AboutSection.astro` (or the matching section component)
2. Adjust the Astro markup, logic, or styling

Techbyte sections typically follow this pattern:

- fetch default content with `getEntryCTM("sections", "...", Astro.currentLocale)`
- merge optional overrides passed in from the page
- bail out early when `enable` is `false`, in most sections

That means content-level changes are safe for most users, while layout changes are the right path for more advanced design edits.