Checking Content
1 min read
Checking Content
Use opencx content check to validate your local content before pushing it to the help center.
Usage
bash
opencx content check
On success:
All good! 3 categories, 12 articles
What It Validates
- Directory structure -- subdirectories are categories; category metadata (name, etc.) is optional and lives in
opencx.jsonundercategories. - Frontmatter -- every
.mdfile must have YAML frontmatter with atitlefield. - Slugs -- directory and file names must be valid slugs (
^[a-z0-9]+(?:-[a-z0-9]+)*$).
Flags
| Flag | Description |
|---|---|
--json | Output validation results as JSON |
Exit Codes
| Code | Meaning |
|---|---|
0 | All checks passed |
1 | One or more validation errors |
Example with JSON output
bash
opencx content check --json
This is useful in CI pipelines where you want to parse the validation results programmatically.