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

Sections

Files: src/content/sections/english/ (and each other language folder), page content files · Skill level: Beginner to edit, light code to add or move

A section is one full-width block of a page: the hero, the practice area grid, the reviews, the contact form. A reusable section is two files that share a name:

src/layouts/components/sections/hero/HeroPortraitNavy.astro ← how it looks (component)
src/content/sections/english/hero-portrait-navy.md ← what it says (content)
src/content/sections/french/hero-portrait-navy.md
src/content/sections/arabic/hero-portrait-navy.md

Components sit in a folder named after their kind (hero/, practice/, team/), and their name is the kind plus the layout: HeroPortraitNavy is the portrait-navy layout of the hero. How Covena Works explains the idea. This page is the practical reference.

Change A Section Everywhere

Edit its file in src/content/sections/english/, then the file with the same name in french/ and arabic/. Each language is edited on its own, so changing the English file doesn’t change the others.

The comments in each file say what each field does and where the content comes from. Some sections only hold headings and labels and pull the rest from a collection. For example, practice-grid-navy.md lists practice area slugs, and each card’s title, icon and link come from that area’s file in src/content/practice-areas/.

Hide A Section

  • Everywhere: set enable: false at the top of its section file.

  • On one page: add the section’s block to that page’s content file with enable: false:

    src/content/homepage/english/-index.md
    testimonialSlider:
    enable: false

To take a section off a page for good, remove its tag from the page file in src/pages/[...lang]/ instead. The order of the tags in that file is the order on the page.

Change A Section On One Page

Add a named block to the page’s content file with only the fields you want to change. Covena merges the block over the section file:

  • Objects merge key by key. Changing a button’s label keeps its url.
  • Lists replace the whole default list. Copy every item you want to keep. [] clears the list.
  • An empty string ("") clears a value.
  • enable: false hides the section on that page.
src/content/homepage/english/-index.md
heroPortraitNavy:
title: "Plain legal advice for <em>you</em>"
button:
label: "Book a call" # the url stays /consultation/

One word wrapped in <em> in a title is set in the accent serif (Instrument Serif italic).

Each homepage file lists its block names in a comment at the top. The block name is the component name with a lowercase first letter: HeroPortraitNavy reads heroPortraitNavy. A block with a wrong name is ignored without an error, so copy names from that comment.

Which Pages Accept Which Blocks

PageContent fileBlocks
/ (Home 1)src/content/homepage/english/-index.mdheroPortraitNavy, featuresTrio, aboutCollage, practiceGridNavy, whyUsAccordionPanel, processPhotoCards, testimonialSlider, insightsBronzePanel, contactSplitForm
/home-corporate/ (Home 2)src/content/homepage/english/home-corporate.mdheroFramedLight, logosRow, aboutStatement, practiceRows, industriesMarqueeCards, statsPortraitsBand, teamCarousel, resultsCards, insightsFeaturedList, ctaBandNavy
/home-family/ (Home 3)src/content/homepage/english/home-family.mdheroPhotoFull, recognitionAwardsBadges, practiceSituations, feesFixedFees, processStepsLine, testimonialQuoteCentred, teamGrid4, faqSplit, contactCallbackPanel
/about/src/content/about/english/-index.mdstatsBandBronze, aboutVisionSplit, processPhotoCards, valuesRows, teamPanel, contactSplitForm
/practice-areas/src/content/practice-areas/english/-index.mdpracticeGridNavy, whyUsAccordionPanel, testimonialSlider, contactSplitForm (also used on every practice area page)
/industries/src/content/industries/english/-index.mdcontactSplitForm (also used on every industry page)
/attorneys/src/content/attorneys/english/-index.mdcontactSplitForm (also used on every profile)
/offices/src/content/offices/english/-index.mdcontactSplitForm (also used on every office page)
/results/src/content/results/english/-index.mdctaPanelCentered, contactSplitForm (on every result page)
/reviews/src/content/reviews/english/-index.mdcontactSplitForm
/careers/src/content/careers/english/-index.mdvaluesRows, ctaPanelCentered
/recognition/, /fees/recognition/english/-index.md, fees/english/-index.mdctaPanelCentered (Fees also corporateFaq)
/insights/src/content/blog/english/-index.mdnewsletterSection

The History page reads its content from src/content/sections/english/company-page.md: the timeline, the community block (shown with the vision-split about layout) and ctaPanelCentered.

Every Section File

File in src/content/sections/<language>/Used on
hero-portrait-navy.mdHome 1
hero-framed-light.mdHome 2
hero-photo-full.mdHome 3
features-trio.mdHome 1
about-collage.mdHome 1
about-statement.mdHome 2
about-vision-split.mdAbout
company-page.mdHistory (timeline, community, call to action)
practice-grid-navy.mdHome 1, Practice areas
practice-rows.mdHome 2
practice-situations.mdHome 3
industries-marquee-cards.mdHome 2
why-us-accordion-panel.mdHome 1, Practice areas
process-photo-cards.mdHome 1, About
process-steps-line.mdHome 3
stats-band-bronze.mdAbout
stats-portraits-band.mdHome 2
testimonial-slider.mdHome 1, Practice areas
testimonial-quote-centred.mdHome 3
team-carousel.mdHome 2
team-grid-4.mdHome 3
team-panel.mdAbout
values-rows.mdAbout, Careers
logos-row.mdHome 2
recognition-awards-badges.mdHome 3
results-cards.mdHome 2
fees-fixed-fees.mdHome 3
faq-split.mdHome 3
insights-bronze-panel.mdHome 1, insight posts (related posts), attorney profiles
insights-featured-list.mdHome 2
newsletter.mdInsights
contact-split-form.mdHome 1 and most inner pages
contact-callback-panel.mdHome 3
cta-band-navy.mdHome 2
cta-panel-centered.mdCareers, History, Recognition, Fees, Results
search-list.mdSearch
cookie-consent.mdThe cookie banner on every page (Cookies & Analytics)

src/layouts/components/sections/section-ownership.md is the full list: every section component, the file its content comes from, and the pages that import it. It also lists the page-only sections, such as the fee tables and the attorney profile, whose content lives in the page’s own -index.md instead of a section file. npm run verify checks that every section component has a row there.

Add A New Section

This needs light code. The short version:

  1. Create the component in src/layouts/components/sections/<kind>/, using a section of the same kind as a template.
  2. Create its content file in every language folder of src/content/sections/, with options.layout and a comment listing the other layouts of that kind.
  3. Add its schema to src/sections.schema.ts and register it in sectionsSchema with createSectionOverride.
  4. Add its row to section-ownership.md.
  5. Import it in the page file, read the page’s named block, and pass it as content.

SKILLS.md in the theme folder has the full recipe, written for AI assistants. See Customize With AI.

Do It With AI

On the Covena homepage (/), change the heroPortraitNavy section for this page only. In
src/content/homepage/english/-index.md add a heroPortraitNavy block with title "[TITLE]" and
description "[DESCRIPTION]". Don't edit src/content/sections/. Make the same change in the french
and arabic folders with translated text. Then run npm run astro-check.
Type something to search...