Derive rules from real publishing failures
Astro content collections can use schemas to validate data. Start with failures you actually need to prevent: an incorrect date type, missing identifier or absent required heading. Distinguish technically invalid material from deliberately unfinished writing.
Prepare three records: a normal page, a page using optional fields and an intentionally invalid entry. If the model cannot express a legitimate draft, an editor may invent values just to save it. Design the workflow so unfinished work can be retained without being published.
Separate a field rule from page relationships
A correctly formatted page identifier does not prove its destination exists. Two individually valid records may also share a URL or compete for the same intent. Checks across the complete register are therefore needed alongside validation of individual entries.
Create one case with a removed related page and another where a published page links to a draft. Decide what the check should report and who corrects the content. Passing a schema should not excuse a broken user journey.
| Check level | Example test |
|---|---|
| Field | A heading or identifier is missing |
| Register | Two records share a final address |
| Relationship | A link targets missing or unpublished content |
| Editorial | A well-formatted claim lacks evidence |
| Rendered page | Headings, links and content appear correctly in HTML |
Verify what publication status actually controls
Document how status is used by page generation, hubs and the sitemap. Create a harmless draft in an isolated setting and verify that it does not appear as finished content. Check what happens when previously published material is withdrawn as well. Removing a link alone may leave its direct address available.
Appropriate tools depend on the project's loader, register and rendering mode. Inspect the implementation rather than assuming a field named draft automatically protects the page. The useful test outcome is what a visitor and crawler can actually reach.
Build a small review matrix
Connect each technical fault with a testable expectation and each editorial question with a responsible person. A check may confirm that a source is listed without establishing that it supports the claim. It can identify similar wording but still needs human assessment of overlapping intent.
Finish by reviewing the generated page. Confirm title, main heading, direct answer, tables and internal links. Test valid examples and deliberately faulty inputs; a check that never sees bad data can create false confidence. Save examples and decisions so the next content type starts with more than a list of field names. The schema provides useful protection, while publication still requires editorial responsibility.