Skip to content

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ΒΆ

  1. Directory Structure - All folders created with proper underscore prefix
  2. MkDocs Configuration - Full configuration in mkdocs.yml
  3. Starter Documentation:
  4. Home page with quick links
  5. Installation guide (Windows/Linux/macOS)
  6. Quick Start tutorial
  7. System Requirements
  8. FAQ
  9. Auto-Generation Script: _utils/doc_generators/generate_dialog_docs.py
  10. Extracts widget information from .ui files
  11. Reads tooltips we added earlier
  12. Generated 39 dialog documentation pages automatically!
  13. 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:

cd E:\python\source
python _utils/doc_generators/generate_dialog_docs.py

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ΒΆ

  1. user-guide/overview.md - Describe what XdTd does
  2. user-guide/workflow.md - Typical analysis steps
  3. videos/index.md - Link to your tutorial videos

Priority 2: Add ScreenshotsΒΆ

  1. Take screenshots of key dialogs
  2. Save to _docs/images/screenshots/
  3. The generated docs have placeholders ready

Priority 3: Technical ReferencesΒΆ

  1. reference/crack-models.md - Crack growth equations
  2. reference/boundary-conditions.md - BC types
  3. 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.yml version when releasing

Deployment OptionsΒΆ

Option 1: GitHub Pages (Free)ΒΆ

mkdocs gh-deploy
# URL: https://nksalgado-proton.github.io/XdTd2d-Python/

Option 2: Your WebsiteΒΆ

mkdocs build
# Copy _docs/site/ to www.xdtd.com/docs/

Option 3: Include in InstallerΒΆ

mkdocs build
# Include _docs/site/ in installation package
# Users open docs/index.html locally

Option 4: All Three!ΒΆ

Use all three methods simultaneously - they're not mutually exclusive.

TipsΒΆ

Writing DocumentationΒΆ

  • Use admonitions for important notes:

    !!! tip "Pro Tip"
        This is a helpful tip
    
    !!! warning "Important"
        This is a warning
    

  • Add screenshots:

    ![Dialog Screenshot](../images/screenshots/dialog.png)
    

  • Link between pages:

    See [Installation](getting-started/installation.md)
    

Testing Before DeploymentΒΆ

Always test locally first:

mkdocs serve
# Check all pages render correctly
# Test all links work
# Verify images load

Questions?ΒΆ

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!