Markdown support
Theneo provides robust markdown support both within the editor and through CLI-based markdown imports, enabling flexible documentation creation and management workflows.
In-Editor Markdown Support
Standard Markdown Formatting
Theneo's editor supports all standard markdown formatting including:
- Headers (H1-H6)
- Bold and italic text
Inline codeand code blocks with syntax highlighting- Lists (ordered and unordered)
- Links and images
- Tables
- Blockquotes
- Horizontal rules
Theneo Custom Widgets
Beyond standard markdown, Theneo provides custom widgets that enhance API documentation with interactive elements. These widgets enable rich content presentation directly within your markdown files.
Code Blocks with Enhanced Features
<CodeBlock attributes='{"isFitToPage":true,"style":{},"lang":"bash","label":"Bash"}'> <CodeLine>npm install -g @theneo/cli@latest</CodeLine></CodeBlock>Interactive Accordions
<Accordion attributes='{"style":{"width":"100%"}}'><AccordionItem title="Authentication" iconUrl=""> <p>Your authentication content here</p></AccordionItem></Accordion>Callout Blocks
<Callout attributes='{"isFitToPage":true,"dataType":"info","style":{"width":"100%"}}'> Important information for your users</Callout>These widgets can be combined with standard markdown to create comprehensive, interactive API documentation that enhances developer experience.
Importing Markdown Folders
Theneo CLI provides powerful capabilities for managing documentation through markdown files, enabling version control and collaborative workflows.
Installation
npm install -g @theneo/cli@latestProject Structure Requirements
To import markdown folders into Theneo, your project must follow a specific structure:
Configuration Files
theneo.json - Project Structure Definition
The theneo.json file defines the overall structure and hierarchy of your documentation:
{ "name": "Your API Documentation", "baseUrl": "https://api.yourdomain.com", "sections": [ { "name": "Introduction", "slug": "introduction", "icon": "6", "isHeader": false }, { "name": "Getting Started", "slug": "getting-started", "isHeader": true, "children": [ { "name": "Authentication", "slug": "getting-started/authentication", "icon": "5" } ] }, { "name": "API Reference", "slug": "api-reference", "isHeader": true, "children": [ { "name": "Customer Management", "slug": "api-reference/customer-management", "children": [ { "name": "Create Customer", "slug": "api-reference/customer-management/create-customer" } ] } ] } ]}section.json - API Endpoint Definition
For sections containing API endpoints, the section.json file defines request and response specifications:
{ "endpoints": { "method": "POST", "path": "/customers" }, "request": { "contentType": "application/json", "body": [ { "name": "given_name", "description": "The first name of the customer", "isRequired": true, "valueType": "string", "value": "John" }, { "name": "email_address", "description": "The email address of the customer", "isRequired": true, "valueType": "string", "value": "john@example.com" } ], "header": [ { "name": "Authorization", "description": "Bearer token for authentication", "isRequired": true, "valueType": "string", "value": "Bearer <access_token>" } ] }, "responses": [ { "statusCode": 200, "description": "Successful response", "contentType": "application/json", "body": [ { "name": "customer", "description": "The created customer object", "valueType": "object" } ] } ]}For sections without API endpoints (like introductory content), section.json can be an empty object {}.
CLI Commands for Markdown Management
Creating a New Project from Markdown
theneo create --dir ./your-documentation --name "API Documentation" --workspace your-workspaceImporting/Updating Existing Project
theneo import --dir ./your-documentation --project your-project-slug --workspace your-workspaceExporting Project as Markdown
theneo export --project your-project-slug --dir ./exported-docsBest Practices
- Version Control: Keep your markdown documentation in Git for version tracking and collaboration
- Consistent Structure: Maintain the required folder structure for seamless imports
- Modular Organization: Organize endpoints logically within nested folders
- Descriptive Names: Use clear, kebab-case slugs for sections and endpoints
- Complete Metadata: Ensure all
section.jsonfiles contain complete API specifications - Regular Sync: Use CI/CD pipelines to automatically sync documentation updates
Example Workflow
- mkdir api-docs && cd api-docstouch theneo.json
- mkdir -p api-reference/customersecho "# Customer Management API" > api-reference/customers/index.mdecho '{}' > api-reference/customers/section.json
- theneo login --token your-api-keytheneo create --dir . --name "My API Docs" --publish
- # Make changes to your markdown filestheneo import --dir . --project your-project-slug --publish
Advanced Features
AI-Powered Description Generation
When importing documentation, leverage AI to automatically generate or enhance descriptions:
theneo project create --file ./openapi.json --generate-description fillOptions:
fill: Add descriptions where missingoverwrite: Replace all existing descriptionsno_generation: Skip AI generation (default)
Multi-Environment Support - Only for Enterprise accounts
Use profiles for different environments:
theneo login --profile production --token prod-api-keytheneo import --dir . --project api-docs --profile productionWorking with Complex API Structures
For complex APIs with nested resources, organize your folder structure to mirror your API architecture:
This structure translates to:
/customers- Create Customer/customers/{id}- Retrieve Customer/customers/{id}/orders- List Customer Orders
Troubleshooting
Common Issues and Solutions
- Import fails with structure error:
- Verify
theneo.jsonexists in root directory - Ensure all section slugs match folder names exactly
- Check that each section folder contains
index.mdandsection.json
- API endpoints not appearing:
- Confirm
section.jsoncontains valid endpoint configuration - Validate JSON syntax in all configuration files
- Ensure
methodandpathare correctly specified
- Markdown rendering issues:
- Use proper escaping for special characters
- Verify custom widget syntax matches documentation
- Test widgets individually before combining
- Authentication errors:
- Confirm API key is valid:
theneo login --token your-api-key - Check workspace permissions
- Verify profile configuration if using multiple environments
Migration Guide
From Static Markdown to Theneo
If you have existing markdown documentation, follow these steps to migrate:
- Analyze current structure: Map your existing documentation to Theneo's section hierarchy
- Create theneo.json: Define your documentation structure
- Reorganize files: Move markdown files into the required folder structure
- Add section.json files: Define API endpoints where applicable
- Test import locally: Use
theneo create --dir . --name "Test Import" - Iterate and refine: Adjust structure based on import results
From Other Documentation Platforms
When migrating from platforms like Swagger UI, Redoc, or Postman:
- Export OpenAPI/Swagger spec if available
- Use Theneo's import feature:
theneo project create --file openapi.json - Export as markdown:
theneo export --project your-project --dir ./markdown - Customize markdown files with additional content
- Re-import with enhancements:
theneo import --dir ./markdown --project your-project
Integration with CI/CD
GitHub Actions Example
name: Deploy Documentationon: push: branches: [main] paths: - 'docs/**'jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: '16' - name: Install Theneo CLI run: npm install -g @theneo/cli@latest - name: Deploy to Theneo env: THENEO_API_KEY: ${{ secrets.THENEO_API_KEY }} run: | theneo import \ --dir ./docs \ --project ${{ vars.THENEO_PROJECT }} \ --workspace ${{ vars.THENEO_WORKSPACE }} \ --publishGitLab CI Example
deploy-docs: stage: deploy image: node:16 script: - npm install -g @theneo/cli@latest - theneo login --token $THENEO_API_KEY - theneo import --dir ./docs --project $THENEO_PROJECT --publish only: - main when: manualConclusion
Theneo's markdown support provides a flexible, developer-friendly approach to API documentation. Whether you prefer working directly in the editor with custom widgets or managing documentation as code through the CLI, Theneo adapts to your workflow while maintaining professional, interactive documentation.
For more information and updates, visit:
What made this section unhelpful for you?
On this page
- Markdown support