Concrete
Rulespages

concrete/pages/non-section-markup

A page emits markup that is not a section; a page may contain only sections.

A page emits markup that is not a section; a page may contain only sections.

Graded by the composition stage of concrete check, in the probe venue. A violation reports this id and the file it failed at — see every rule and concrete check.

Reason

A page is rendered once, by a probe that records the sections it places and keeps nothing else. A page is a site map, not markup: the platform composes the artifact out of section instances, and it has nowhere to put a wrapper, a heading or a grid that belongs to no section. Markup left over after the sections record themselves would simply vanish from the published page, so it is refused here instead.

Fix

Move the markup inside the section that should own it — a section root can be any element and carry any classes — or, when it really is page furniture, make it a section of its own and place that.

Before and after

import { Section, section, Slot, text } from "@homepages/concrete";

const Hero = section(
  { key: "hero", label: "Hero", slots: { headline: text.medium({ label: "Headline" }) } },
  ({ slot }) => (
    <Section>
      <Slot.Text slot={slot.headline} as="h1" />
    </Section>
  ),
);

export const Home = () => (
  <main className="mx-auto max-w-5xl px-6">
    <Hero />
  </main>
);
import { Section, section, Slot, text } from "@homepages/concrete";

const Hero = section(
  { key: "hero", label: "Hero", slots: { headline: text.medium({ label: "Headline" }) } },
  ({ slot }) => (
    <Section className="mx-auto max-w-5xl px-6">
      <Slot.Text slot={slot.headline} as="h1" />
    </Section>
  ),
);

export const Home = () => <Hero />;

On this page