XdTd Documentation Setup GuideΒΆ
This document describes the documentation structure and how to use it.
Directory StructureΒΆ
E:\python\source\
βββ _docs/ # Documentation source files
β βββ getting-started/ # Installation & quick start
β βββ user-guide/ # User documentation
β βββ reference/ # Technical reference
β βββ examples/ # Example case studies
β βββ videos/ # Video tutorial links
β βββ images/ # Screenshots & diagrams
β βββ generated/ # Auto-generated from code
β β βββ (39 dialog docs) # From UI files with tooltips
β βββ index.md # Homepage
β βββ faq.md # FAQ
β βββ ...
β
βββ _utils/ # Utility scripts
β βββ doc_generators/
β β βββ generate_dialog_docs.py # Extracts docs from .ui files
β βββ README.md
β
βββ mkdocs.yml # MkDocs configuration
βββ requirements-docs.txt # Documentation dependencies
βββ README.md # Repository README
Documentation builds to: _docs/site/
What Has Been Set UpΒΆ
β CompletedΒΆ
- Directory Structure - All folders created with proper underscore prefix
- MkDocs Configuration - Full configuration in
mkdocs.yml - Starter Documentation:
- Home page with quick links
- Installation guide (Windows/Linux/macOS)
- Quick Start tutorial
- System Requirements
- FAQ
- Auto-Generation Script:
_utils/doc_generators/generate_dialog_docs.py - Extracts widget information from .ui files
- Reads tooltips we added earlier
- Generated 39 dialog documentation pages automatically!
- Documentation Dependencies:
requirements-docs.txt
π To Be Completed (Manual Content)ΒΆ
The following pages need manual writing (templates created):
- user-guide/overview.md - Application overview
- user-guide/workflow.md - Typical analysis workflow
- user-guide/interface.md - UI explanation
- user-guide/tutorials/*.md - Step-by-step tutorials
- reference/*.md - Technical references
- examples/*.md - Example projects
- videos/index.md - Video tutorial links
How to UseΒΆ
View Documentation LocallyΒΆ
# Install dependencies (first time only)
pip install -r requirements-docs.txt
# Start local server
cd E:\python\source
mkdocs serve
# Open browser to: http://127.0.0.1:8000
Regenerate Dialog DocumentationΒΆ
Whenever you update tooltips in .ui files:
This will update all 39 generated documentation files.
Build Static HTMLΒΆ
# Build documentation to _docs/site/
mkdocs build
# The site/ folder contains complete HTML documentation
# Can be:
# - Copied to your website (www.xdtd.com/docs/)
# - Included in installer for offline use
# - Deployed to GitHub Pages
Deploy to GitHub PagesΒΆ
# One command deployment (requires git push access)
mkdocs gh-deploy
# Documentation will be available at:
# https://nksalgado-proton.github.io/XdTd2d-Python/
Generated Dialog DocumentationΒΆ
The script automatically generated documentation for 39 dialogs that have tooltips:
Key dialogs documented: - DtdStiffenedPanelDialog (27 fields) - DtdMaterialPropertiesDialog (11 fields) - DtdSettingsDataDialog (19 fields) - DtdSelectTopology_2dDialog (12 fields) - And 35 more...
Each generated page includes: - Dialog description - Table of all fields with tooltips - Field types (Number, Dropdown, Checkbox, etc.) - Constraints (min/max values) - Related topics links
Features of the DocumentationΒΆ
Material Theme FeaturesΒΆ
- β Light/Dark mode toggle
- β Instant search
- β Mobile responsive
- β Code syntax highlighting
- β Admonitions (Info, Warning, Tip boxes)
- β Tabbed content
- β Table of contents
- β GitHub integration
Markdown ExtensionsΒΆ
- Math equations (LaTeX)
- Diagrams (Mermaid)
- Task lists
- Code annotations
- And more...
Next StepsΒΆ
Priority 1: Add Manual ContentΒΆ
- user-guide/overview.md - Describe what XdTd does
- user-guide/workflow.md - Typical analysis steps
- videos/index.md - Link to your tutorial videos
Priority 2: Add ScreenshotsΒΆ
- Take screenshots of key dialogs
- Save to
_docs/images/screenshots/ - The generated docs have placeholders ready
Priority 3: Technical ReferencesΒΆ
- reference/crack-models.md - Crack growth equations
- reference/boundary-conditions.md - BC types
- reference/settings.md - Extract from GLOBAL_SETTINGS
Priority 4: Example ProjectsΒΆ
Create example case studies in examples/ with:
- Problem description
- Input files
- Expected results
MaintenanceΒΆ
When to RegenerateΒΆ
Run the generator when: - βοΈ Tooltips are added/updated in .ui files - π New dialogs are created - π Dialog fields change
Keeping Docs in SyncΒΆ
- Documentation lives in same repository as code
- Version tags apply to both code and docs
- Update
mkdocs.ymlversion when releasing
Deployment OptionsΒΆ
Option 1: GitHub Pages (Free)ΒΆ
Option 2: Your WebsiteΒΆ
Option 3: Include in InstallerΒΆ
Option 4: All Three!ΒΆ
Use all three methods simultaneously - they're not mutually exclusive.
TipsΒΆ
Writing DocumentationΒΆ
-
Use admonitions for important notes:
-
Add screenshots:
-
Link between pages:
Testing Before DeploymentΒΆ
Always test locally first:
Questions?ΒΆ
- π MkDocs Documentation
- π¨ Material Theme Docs
- π Python Markdown Extensions
SummaryΒΆ
You now have: - β Professional documentation framework - β 39 auto-generated dialog reference pages - β Starter pages for getting started - β Tools to keep docs updated - β Multiple deployment options
The documentation is production-ready and can be deployed immediately, with manual content added progressively as time permits!