Skip to content
New: Customize your theme with an AI assistant. Read the guide

Homepages

Files: src/pages/[...lang]/index.astro, home-corporate.astro, home-family.astro, src/content/homepage/<language>/ · Skill level: Beginner to edit text, light code to reorder or swap

Covena has three homepages, each written for a different kind of firm, and each with its own header and footer. Use the one closest to your practice as your homepage, and keep, change, or delete the others.

HomepageURLRoute fileContent fileHeader, footer
General practice (Home 1)/src/pages/[...lang]/index.astrosrc/content/homepage/english/-index.mdpanel over the hero, marquee
Corporate (Home 2)/home-corporate/src/pages/[...lang]/home-corporate.astrosrc/content/homepage/english/home-corporate.mdbar, columns-light
Family and private client (Home 3)/home-family/src/pages/[...lang]/home-family.astrosrc/content/homepage/english/home-family.mdtransparent with quick exit, offices

The French and Arabic content files are in french/ and arabic/ next to english/, with the same names. The route files are shared by all languages.

How A Homepage Is Built

The route file lists the sections in the order they appear, and sets the header and footer. The content file holds the page title and meta description, and any change you make to a section on this page only. Each section’s default text and images are in src/content/sections/<language>/, one file per section.

So there are two ways to change a section’s text:

  • Edit its file in src/content/sections/<language>/. This changes it on every page that uses it.
  • Add a block with the section’s name to the homepage content file. This changes it on this homepage only.

The comment at the top of each homepage content file lists its block names. For example, to change the Home 1 hero title on Home 1 only:

src/content/homepage/english/-index.md
heroPortraitNavy:
title: "Plain legal advice for <em>you</em>"

Fields you leave out keep the default, and enable: false hides the section on this page. Sections has all the rules.

Home 1: General Practice

Covena Home 1, a navy hero with a lawyer's portrait

Sections, top to bottom, with their block name and section file:

  1. Hero with a portrait on a bronze panel: heroPortraitNavy (hero-portrait-navy.md)
  2. Three short facts about the firm: featuresTrio (features-trio.md)
  3. About with a photo collage: aboutCollage (about-collage.md)
  4. Practice areas grid on navy: practiceGridNavy (practice-grid-navy.md)
  5. Why clients choose us, an accordion beside a photo: whyUsAccordionPanel (why-us-accordion-panel.md)
  6. How we work, three steps on photo cards: processPhotoCards (process-photo-cards.md)
  7. Client reviews slider: testimonialSlider (testimonial-slider.md)
  8. Latest insights on a bronze panel: insightsBronzePanel (insights-bronze-panel.md)
  9. Contact form with the firm’s phone and email: contactSplitForm (contact-split-form.md)

Home 1 also turns on the footer reveal (footerReveal: true in its content file).

Home 2: Corporate

Covena Home 2, a light hero with a framed office photo and figures

  1. Hero with a framed photo and a figures card: heroFramedLight (hero-framed-light.md)
  2. Client logos: logosRow (logos-row.md)
  3. A one-paragraph statement: aboutStatement (about-statement.md)
  4. Practice areas as rows: practiceRows (practice-rows.md)
  5. Industries as scrolling cards: industriesMarqueeCards (industries-marquee-cards.md)
  6. Figures with portraits: statsPortraitsBand (stats-portraits-band.md)
  7. Lawyers carousel: teamCarousel (team-carousel.md)
  8. Results as stacked cards, with the past-results disclaimer: resultsCards (results-cards.md)
  9. A featured insight and a list: insightsFeaturedList (insights-featured-list.md)
  10. Navy call to action band: ctaBandNavy (cta-band-navy.md)

Home 3: Family And Private Client

Covena Home 3, a full photo hero with the transparent header

  1. Full photo hero: heroPhotoFull (hero-photo-full.md)
  2. Award badges: recognitionAwardsBadges (recognition-awards-badges.md)
  3. “Start with what’s happening”, a grid of life situations: practiceSituations (practice-situations.md)
  4. Fixed fees table: feesFixedFees (fees-fixed-fees.md)
  5. Steps on a line: processStepsLine (process-steps-line.md)
  6. A centred review quote with the rating: testimonialQuoteCentred (testimonial-quote-centred.md)
  7. Four lawyers: teamGrid4 (team-grid-4.md)
  8. Questions and answers: faqSplit (faq-split.md)
  9. Callback request form: contactCallbackPanel (contact-callback-panel.md)

Home 3’s header has the Quick exit button, for visitors reading about separation or domestic abuse who may need to leave the page fast. See Quick Exit.

Reorder, Add, Or Remove A Section

Open the route file. The order of the components inside <Base> is the order on the page:

src/pages/[...lang]/home-family.astro
<Base {...data} headerVariant="transparent" footerVariant="offices">
<HeroPhotoFull content={heroPhotoFull} />
<RecognitionAwardsBadges content={recognitionAwardsBadges} />
<PracticeSituations content={practiceSituations} />
...
</Base>
  • Reorder: move a line up or down.
  • Hide on this page: you don’t need code. Add enable: false under the section’s block in the content file.
  • Remove for good: delete the line and its import at the top of the file.
  • Add a section from another page: copy its import line and its component line from the other route file, and add its block name to the list in the frontmatter part of the file (between the --- lines). Section Layouts explains how sections and their layouts are named.

Make Another Homepage Your Main One

The page at / is whatever src/pages/[...lang]/index.astro builds. To use Home 2 or Home 3 as your main homepage:

  1. Copy everything in the route file you want (for example home-family.astro) and paste it over everything in index.astro. Then, in index.astro, change "home-family" in the getEntryCTM("homepage", "home-family", ...) line to "-index".

  2. In each language folder of src/content/homepage/, copy everything in home-family.md and paste it over -index.md. The main homepage’s content always lives in -index.md, and llms.txt reads the description of / from it.

  3. Delete src/pages/[...lang]/home-family.astro and the three home-family.md files, so the same page isn’t also built at /home-family/.

  4. Remove the homepage links you no longer need from the Home dropdown in src/config/menu.<lang>.json (every language), or turn Home into a plain link to /.

  5. If you use npm run verify, remove "home-family" from the pages list at the top of scripts/check-built-routes.mjs. It checks that each homepage is built.

Remove a homepage you don’t need: delete its route file, its content file in each language folder, its link in each menu file, and its line in scripts/check-built-routes.mjs.

Do It With AI

Make Home 3 (family and private client) the main homepage. Replace the contents of
src/pages/[...lang]/index.astro with the contents of src/pages/[...lang]/home-family.astro, and change
the entry name in its getEntryCTM call from "home-family" to "-index". In every language folder of
src/content/homepage/, replace -index.md with the contents of home-family.md, then delete
home-family.md and src/pages/[...lang]/home-family.astro. Remove "home-family" from the pages list in
scripts/check-built-routes.mjs. In every src/config/menu.<lang>.json, change the "Home" item to a
plain link to "/" with no children. Then run npm run build and confirm / shows the Home 3 sections.
Type something to search...