Heretto integration
Heretto is a component content management system (CCMS) for technical documentation. Doc Detective can load Darwin Information Typing Architecture (DITA) content directly from your Heretto CCMS. You can then run tests against live content without manual exports or local copies.
This integration requires an appropriate Heretto license with API access.
Prerequisites
Before using the Heretto integration, you need:
- A Heretto account with API access
- Your Heretto organization ID
- Heretto username and API token
- A publishing scenario configured in Heretto with
transtypeset todita
Configuration
Add entries to the integrations.heretto array in your config file:
Configuration options
Using Heretto as an input source
Reference your Heretto content using the heretto:<name> syntax in your input paths:
When Doc Detective encounters heretto:my-docs, it:
- Finds the publishing scenario named
Doc Detective(or your customscenarioName) - Triggers a publishing job in Heretto
- Polls the job until the required output is available
- Downloads and extracts the published DITA content
- Processes the DITA files for test detection
Doc Detective checks for the required DITA content files in the job output instead of relying on the job status code. Content loads successfully as long as the expected .ditamap files are generated, even if Heretto reports the job as incomplete.
Environment variables
For security, store credentials as environment variables rather than in config files:
Example using environment variables with loadVariables:
Publishing scenario requirements
Your Heretto publishing scenario must have:
- The
transtypeparameter set todita - A file picker parameter configured to select the root DITA map
Doc Detective looks for a scenario named Doc Detective by default. Use the scenarioName option to specify a different scenario.
Example workflow
-
Create a
.envfile with your Heretto credentials: -
Add Heretto to your
config.json: -
Run Doc Detective to load and test your Heretto content:
Doc Detective fetches your DITA content from Heretto and processes it using the standard DITA file type patterns. Any inline or detected tests in your DITA files run automatically.
Next steps
- Learn about DITA input format for DITA-specific markup patterns
- Learn about inline tests for defining tests in your documentation
- Learn about detected tests for automatic test generation