Each JSON article needs a stable ID, unique slug, publication date and modification date. The file also needs a schema version and update timestamp.
The useful answer depends on the purpose of the page, the people allowed to edit it and the cost of an error. A reliable workflow separates editorial decisions, technical delivery and final verification instead of hiding all three inside one automated operation.
The decision to make first
Version both data and structure. Adding an optional field is simple; deleting or renaming one requires an explicit migration and checks.
A practical method
- Assign an immutable ID independent of the title.
- Keep published slugs or prepare redirects.
- Use consistent key order for readable diffs.
- Check duplicates, types and dates before commits.
- Tag significant editorial batches in Git.
Checks before publishing
- The source of truth is explicit and can be restored.
- URLs, dates and visible claims match the delivered page.
- A human reviewer can reproduce the check without a hidden service.
The main pitfall
Reusing IDs or regenerating slugs creates collisions, broken links and lost history.
Recommended next step
Write a CLI test that counts items, detects duplicate slugs and validates required fields per language.
