Skip to content
GraphiCore
Development GraphiCore editorial

Content apart from components

Typed collections turn editing a heading into editing text rather than code.

A teal pastel composition of rounded shapes

When a page heading lives in a component’s markup, it stops being content: it cannot be edited without a developer, and it is not checked by the schema.

What a collection gives

  • A schema. The description field is limited in length, slug is validated against a format, date is coerced to a date.
  • Reuse. A section takes an object and does not know where it came from: from a collection or from a manual call on the home page.
  • A single source. The same heading is not duplicated in three components.

Drafts

The draft field excludes an entry from the build. That is convenient: material can be prepared gradually, without showing it to visitors and without adding it to the sitemap.

A practical rule

If the text is changed by someone other than a developer, it lives in the content. Everything else can stay in the code.

  • content
  • architecture