Project Structure
1 min read
Project Structure
The CLI manages help center content as a directory of Markdown files, organized by category.
Configuration
The opencx.json file at the project root configures the CLI:
json
{
"help_center_id": "hc_abc123",
"content_dir": "docs",
"api_url": "https://api.opencx.co",
"dashboard_url": "https://app.opencx.co",
"provider": "cloud"
}
content_dir points to the root directory where all content lives.
Directory Layout
docs/
getting-started/
quickstart.md
installation.md
billing/
plans-and-pricing.md
invoices.md
- Each subdirectory is a category. The directory name is the category slug.
- Category display names (and optional description, icon) are set in
opencx.jsonundercategories(see Category metadata). - Each
*.mdfile is an article. The filename (without extension) is the article slug.
Slugs
All directory and file names must be valid slugs: lowercase alphanumeric characters and hyphens only, matching the pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$.
Valid: getting-started, billing, plans-and-pricing
Invalid: Getting Started, billing_info, --leading-hyphen
Article Format
Articles are Markdown files with YAML frontmatter. The title field is required:
markdown
---
title: Quickstart
description: Get up and running in minutes.
meta_title: OpenCX Quickstart Guide
meta_description: Learn how to set up OpenCX quickly.
---
Your article content here.
| Field | Required | Description |
|---|---|---|
title | Yes | Article title |
description | No | Short description |
meta_title | No | SEO title override |
meta_description | No | SEO description override |