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

How Covena Works

Skill level: Everyone · Time: 10 minutes

Read this page once and the rest of the docs will make sense. Covena is built from a few ideas that repeat on every page.

The Big Picture

Covena is a static site. When you run npm run build, it turns your text files into finished HTML pages in dist/. There is no database and no admin panel: your files are the website.

config.toml ──► site settings, phone and email, forms, header, quick exit, motion, SEO
menu.en.json ─► header and footer links
theme.css ────► colors, radii, spacing, type scale, breakpoints
en.json ──────► button labels, form messages, main address, tagline
ROUTE src/pages/[...lang]/index.astro
│ which sections, in which order, which header and footer
│
├─ PAGE src/content/homepage/english/-index.md
│ title, SEO, named blocks for this page only
│
└─ each SECTION
├─ default: src/content/sections/english/hero-portrait-navy.md
└─ + page block: heroPortraitNavy: { ... }
Base.astro wraps every page:
head · cookie banner · header · page · footer · back-to-top button

1. Routes Decide What A Page Shows

Each file in src/pages/[...lang]/ is one page (a route). It lists the sections that page shows, top to bottom, and picks the header and footer. This is Home 1, src/pages/[...lang]/index.astro, shortened:

<Base
{...data}
headerVariant="panel"
headerOverlay={true}
footerVariant="marquee">
<HeroPortraitNavy content={heroPortraitNavy} />
<FeaturesTrio content={featuresTrio} />
<AboutCollage content={aboutCollage} />
<PracticeGridNavy content={practiceGridNavy} />
...
<ContactSplitForm content={contactSplitForm} />
</Base>

To move a section, move its line. To remove it from this page, delete its line, or hide it from the content file with enable: false (see step 3). The [...lang] folder makes every route exist once per language: /, /fr/, and /ar/.

2. Sections Have Default Content

Each section reads its text and images from one file in src/content/sections/<language>/. The hero above reads hero-portrait-navy.md. Change that file and the section changes on every page that uses it. src/layouts/components/sections/section-ownership.md lists every section with its file and its pages.

3. Pages Can Override Any Section

To change a section on one page only, add a block with the section’s name to that page’s content file. The homepage files list their block names in a comment at the top:

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

Only the fields you write change. The rest still comes from the section file.

4. How Overrides Merge

  • Fields you leave out keep the default.
  • Nested objects merge, so 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.
  • One word wrapped in <em> in a title is set in the accent serif font.

See Sections for the details.

5. Layouts Are Separate Components

Sections are named by kind and layout: hero/HeroPortraitNavy.astro reads hero-portrait-navy.md, and hero/HeroFramedLight.astro reads hero-framed-light.md. The options.layout value in a section file is a label, and the comment next to it lists the other layouts of that kind. To use another layout on a page, import its component in the route file in place of the current one. See Section Layouts.

6. Base Wraps Every Page

src/layouts/Base.astro adds the head tags, the cookie banner, the header, the footer, the back-to-top button, and the scripts. Each route passes it a few props:

PropValuesDefault
headerVariantpanel, bar, transparentpanel
headerOverlaytrue lets the header float over the first sectionfalse
footerVariantmarquee, columns-light, officesmarquee
footerRevealtrue slides the page up off the footerfalse

See Header and Footer.

7. Firm Details Are Set Once

The main phone and email are in [settings.contactInfo] in config.toml. The main address is contactInfo.address in each src/i18n/<lang>.json, so it can be written the local way. The offices are files in src/content/offices/. The header chips, the footers, and the call links read these, so you change them in one place. See Firm Info.

8. Small Interface Text Lives In i18n Files

Button labels, form messages, the results disclaimer, the price format, and the footer sentences are in src/i18n/en.json, fr.json, and ar.json. All three files have the same keys. See Internationalization.

9. Config Is Converted Before Astro Reads It

Astro can’t read TOML directly, so npm run dev and npm run build first turn src/config/config.toml into .astro/config.generated.json. While the dev server runs, every save of config.toml does this again. Never edit the generated file.

10. Collections Hold The Repeated Content

Practice areas, industries, attorneys, results, offices, careers, and insights are collections: one Markdown file per entry, plus -index.md for the list page. weight sets the list order (lower comes first), and draft: true keeps an entry out of the production build. Practice areas, industries, results, and offices share part of their detail pages through detailDefaults in -index.md, so each entry only sets what differs. See Collections.

11. What Happens During A Build

  1. config.toml is converted to JSON.
  2. Astro checks every content file against its fields (src/content.config.ts and src/sections.schema.ts). A wrong value stops the build and names the file and field.
  3. Every route is rendered once per language into dist/. Internal links get the language prefix on French and Arabic pages.
  4. The sitemap, robots.txt, the RSS feeds, llms.txt, llms-full.txt, and the Markdown copies of pages are written.
  5. If the site URL is not set, a yellow [site] warning prints, and the sitemap is skipped.

Development vs. Production

npm run devnpm run build
What you getA live site at localhost:4321 that updates as you saveFinished files in dist/ to upload
Draft pagesShownLeft out
Forms with no endpointDemo mode, with a hint naming the setting to fill inDemo mode, with a plain “nothing was sent” message
SpeedPages build when you open themEvery page is built at once

Find Where Any Text Comes From

If you see text on a page and don’t know where it lives, look in this order:

  1. The page’s own file, in a named block (src/content/<page>/<language>/-index.md, or src/content/homepage/<language>/ for the homepages)
  2. The section’s default file (src/content/sections/<language>/)
  3. A collection entry (src/content/practice-areas/, attorneys/, results/, offices/, careers/, blog/, …)
  4. The interface text (src/i18n/<lang>.json)
  5. The menus (src/config/menu.<lang>.json)
  6. Site settings (src/config/config.toml)
Type something to search...