NetApp ActiveIQ API Documentation - Development Guide¶
This guide provides instructions for developing and maintaining the NetApp ActiveIQ API documentation using MkDocs Material.
๐ Quick Start¶
Prerequisites¶
- Python 3.10+ (recommended: Python 3.12)
- pip (Python package installer)
- Git
Local Development Setup¶
-
Clone the repository:
-
Create virtual environment:
-
Install dependencies:
-
Start development server:
-
Open in browser: Navigate to
http://localhost:8000
๐ Project Structure¶
โโโ .github/
โ โโโ workflows/
โ โโโ deploy-docs.yml # GitHub Actions workflow
โโโ docs/
โ โโโ stylesheets/
โ โ โโโ extra.css # Custom CSS styling
โ โ โโโ termynal.css # Terminal animation styles
โ โโโ javascripts/
โ โ โโโ extra.js # Enhanced JavaScript features
โ โ โโโ termynal.js # Terminal animation script
โ โโโ index.md # Homepage
โ โโโ api-endpoints.md # API endpoints reference
โ โโโ data-models.md # Data models documentation
โ โโโ examples.md # Basic examples and use cases
โ โโโ advanced-use-cases.md # Advanced workflows with diagrams
โ โโโ navigation.md # Navigation guide
โ โโโ README.md # Documentation summary
โโโ donnees-externes/ # Source data (analyzed)
โโโ mkdocs.yml # MkDocs configuration
โโโ requirements.txt # Python dependencies
โโโ DEVELOPMENT.md # This file
๐ ๏ธ Development Workflow¶
Making Changes¶
- Edit documentation files:
- Markdown files are in the
docs/
directory -
Follow the existing structure and formatting
-
Preview changes locally:
Changes will auto-reload in your browser -
Test the build:
-
Commit and push:
Adding New Content¶
New Documentation Page¶
- Create a new
.md
file in thedocs/
directory - Add front matter with tags:
- Update
mkdocs.yml
navigation section - Add links in relevant existing pages
New Advanced Use Case¶
- Add content to
docs/advanced-use-cases.md
- Include sequence diagrams using Mermaid syntax:
sequenceDiagram participant Client participant API Client->>API: Request API-->>Client: Response
- Add Python code examples with proper syntax highlighting
New API Endpoint Documentation¶
- Update
docs/api-endpoints.md
- Use the consistent format:
๐จ Styling and Customization¶
Custom CSS¶
Edit docs/stylesheets/extra.css
to customize: - NetApp brand colors - Component styling - Responsive design - Dark/light theme variations
Enhanced JavaScript¶
Edit docs/javascripts/extra.js
to add: - Interactive features - API call demonstrations - Enhanced search functionality - Progress indicators
Mermaid Diagrams¶
Use Mermaid syntax for sequence diagrams:
sequenceDiagram
participant User
participant API
participant Storage
User->>API: Create SVM Request
API->>Storage: Initialize SVM
Storage-->>API: SVM Created
API-->>User: Success Response
๐ง Configuration¶
MkDocs Configuration (mkdocs.yml
)¶
Key sections: - nav: Site navigation structure - theme: Material theme configuration - plugins: Enabled plugins and settings - markdown_extensions: Enhanced Markdown features
Theme Features¶
Current enabled features: - Navigation tabs and sections - Code copy buttons - Search with highlighting - Dark/light mode toggle - Instant navigation - Content tabs - Mermaid diagram support
๐ฆ Plugins and Extensions¶
Essential Plugins¶
- mkdocs-material: Material Design theme
- mkdocs-mermaid2-plugin: Sequence diagrams
- mkdocs-git-revision-date-localized-plugin: Last updated dates
- mkdocs-awesome-pages-plugin: Advanced navigation
- mkdocs-macros-plugin: Variables and macros
Markdown Extensions¶
- pymdownx.superfences: Enhanced code blocks
- pymdownx.tabbed: Content tabs
- pymdownx.details: Collapsible sections
- admonition: Info/warning/tip boxes
- toc: Table of contents generation
๐ Deployment¶
GitHub Pages (Automatic)¶
Documentation automatically deploys via GitHub Actions when: - Changes are pushed to main
or master
branch - Files in docs/
, mkdocs.yml
, or requirements.txt
are modified
Manual Deployment¶
Local Preview¶
# Serve locally with live reload
mkdocs serve
# Serve on specific port
mkdocs serve --dev-addr localhost:8080
# Serve with strict mode (catch warnings)
mkdocs serve --strict
๐ Troubleshooting¶
Common Issues¶
-
Plugin installation errors:
-
Mermaid diagrams not rendering:
- Check syntax with Mermaid Live Editor
-
Ensure proper indentation in YAML front matter
-
Navigation not updating:
- Check
mkdocs.yml
nav section syntax -
Ensure file paths are correct and files exist
-
CSS/JS changes not appearing:
- Clear browser cache
- Restart development server
- Check console for JavaScript errors
Debug Mode¶
Run with verbose output:
๐ Content Guidelines¶
Writing Style¶
- Use clear, concise language
- Include code examples for all concepts
- Add practical, real-world examples
- Use consistent terminology throughout
Code Examples¶
- Always include complete, working examples
- Use syntax highlighting with language specification
- Add comments to explain complex operations
- Include both cURL and Python examples where applicable
Sequence Diagrams¶
- Keep diagrams simple and focused
- Use consistent participant naming
- Include error scenarios where relevant
- Add notes for complex interactions
๐ค Contributing¶
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-content
- Make your changes following these guidelines
- Test locally with
mkdocs serve
- Submit a pull request with description of changes
๐ Support¶
For questions or issues: - Check existing GitHub issues - Review this development guide - Test changes locally before submitting - Include error messages in issue reports
This development guide ensures consistent, high-quality documentation for the NetApp ActiveIQ API.