Configure TechDocs locally
Learn how to preview and test your TechDocs documentation locally before publishing.
Working with TechDocs locally allows you to preview changes, test plugins, and troubleshoot issues before pushing your documentation to the repository.
Before you begin
Before working with TechDocs locally, ensure you have the following installed:
1. Install MkDocs
pip install mkdocs2. Install TechDocs core plugin
Install the techdocs-core plugin which includes all essential plugins:
pip install mkdocs-techdocs-coreFor additional plugins, see the TechDocs Plugins Overview.
3. Install TechDocs CLI (recommended)
The TechDocs CLI helps you build and serve documentation locally, mimicking the Harness IDP environment:
npm install -g @techdocs/cliLocal development workflow
Step 1: Navigate to documentation directory
Navigate to the directory containing your documentation files:
Step 2: Serve documentation locally
You have two options for serving documentation locally:
Option 1: Using MkDocs (basic)
Serve your documentation using the standard MkDocs server:
Access your documentation at http://localhost:8000.
Option 2: Using TechDocs CLI (recommended)
Use the TechDocs CLI to mimic the Harness IDP build process:
Benefits:
Renders documentation exactly as it appears in Harness IDP
Automatically generates
mkdocs.ymlif not presentBetter compatibility with TechDocs-specific features
Enable verbose logging for debugging:
LIMITATIONS
iFrames: Cannot be rendered locally; they only work when hosted in Harness IDP
Auto-generated config: If no
mkdocs.ymlexists, TechDocs generates a basic configuration automatically
Step 3: Iterate and test
Edit your Markdown files
Refresh your browser to see changes in real-time
Verify navigation, plugins, and content rendering
Test all links and embedded media
Troubleshooting
Plugin errors
Symptoms:
"Plugin not found" or "Plugin not installed" errors
Missing features or functionality
Solutions:
Ensure all required plugins are installed:
pip install mkdocs-techdocs-coreVerify plugin compatibility with your MkDocs version
Check that plugins are correctly listed in your
mkdocs.ymlUse
techdocs-coreinstead of individual plugins (go to TechDocs Plugins)
Render issues
Symptoms:
Content not displaying correctly
Broken formatting or layout
Missing navigation elements
Solutions:
Test with both
mkdocs serveandtechdocs-cli serveto identify discrepanciesReview your
mkdocs.ymlconfiguration for syntax errorsVerify all Markdown files use correct syntax
Check that image and file paths are correct
Build warnings and errors
Symptoms:
Build fails or produces warnings
Documentation does not generate properly
Solutions:
Run a clean build to identify issues:
Review the output for specific error messages and warnings, then address them accordingly.
Last updated
Was this helpful?