Commit ef12e07
authored
📚 Implement MkDocs with Material Theme for Documentation Build System (#78)
## 🎯 Overview
This PR implements MkDocs with the Material theme to generate HTML
documentation from the existing `docs/` folder, integrates it with
GitHub Actions, and ensures proper build artifacts management.
## 🔧 Changes Made
### Core Setup
- ✅ **MkDocs Configuration**: Created `mkdocs.yml` with Material theme
configuration
- ✅ **Documentation Structure**: Configured MkDocs to build from
`./docs/` source directory
- ✅ **Output Directory**: Set output directory to `./site/docs/`
(gitignored)
- ✅ **Dependencies**: Added `requirements.docs.txt` for MkDocs and
Material theme
### GitHub Actions Integration
- ✅ **Workflow Updates**: Modified `.github/workflows/deploy-pages.yml`
- Added Python setup step with dependency caching
- Added MkDocs dependency installation
- Added MkDocs build step before deployment
- Updated workflow triggers to include `docs/**`, `mkdocs.yml`, and
`requirements.docs.txt` changes
- Added `fetch-depth: 0` for git-revision-date-localized plugin
### Repository Management
- ✅ **Git Ignore**: Updated `.gitignore` to exclude `./site/docs/`
directory
- ✅ **Build Artifacts**: Generated documentation is treated as build
artifact (not committed)
- ✅ **Existing Structure**: Maintained existing `./site/` structure for
other static assets
## 🚀 Features Implemented
### Material Theme Configuration
- **Light/Dark Mode Toggle**: Automatic theme switching
- **Navigation**: Tabs, sections, and expandable navigation
- **Search**: Enhanced search with highlighting and sharing
- **Code Features**: Syntax highlighting with copy buttons
- **Mobile Responsive**: Optimized for mobile devices
### MkDocs Extensions
- **Admonitions**: Call-out boxes for notes, warnings, etc.
- **Code Highlighting**: Syntax highlighting with line numbers
- **Tabbed Content**: Support for tabbed sections
- **Table of Contents**: Auto-generated TOC with permalinks
- **Git Integration**: Last modified dates from Git history
### Navigation Structure
Organized documentation into logical sections:
- **Getting Started**: Installation, Quick Start, Usage
- **Configuration**: YAML Config, Template Variables, File Handling,
Mappings
- **Advanced Features**: Custom Structures, Hooks, GitHub Integration,
Schema
- **Development**: Dev Setup, Completion, Contributing
- **Reference**: Examples, Articles, Known Issues, Funding
## 🧪 Testing
- ✅ **Local Build**: `mkdocs build` successfully generates static HTML
- ✅ **Output Directory**: Documentation generated in `./site/docs/`
- ✅ **Git Ignore**: Generated files properly excluded from version
control
- ✅ **Material Theme**: Theme applied with proper styling and features
- ✅ **Navigation**: All documented pages accessible through navigation
## 📝 Usage
### Local Development
```bash
# Install dependencies
pip install -r requirements.docs.txt
# Serve documentation locally with live reload
mkdocs serve
# Build documentation
mkdocs build
```
### Production Deployment
GitHub Actions will automatically:
1. Install Python and MkDocs dependencies
2. Build documentation with `mkdocs build`
3. Deploy to GitHub Pages alongside existing static assets
## 🔗 Closes
Closes #77
## 🚦 Checklist
- [x] MkDocs installed and configured with Material theme
- [x] Documentation builds from `./docs/` source directory
- [x] Output directory set to `./site/docs/`
- [x] `mkdocs.yml` configuration file created
- [x] GitHub Actions workflow updated with MkDocs build step
- [x] Python dependencies installation added to workflow
- [x] Workflow triggers updated for documentation changes
- [x] `.gitignore` updated to exclude `./site/docs/`
- [x] Build artifacts properly managed (not committed)
- [x] Local development supports `mkdocs serve`
- [x] Documentation successfully builds and generates HTML
## 🔍 Additional Notes
- The build process shows some warnings about missing documentation
files referenced in existing docs. These can be addressed in future
updates.
- The Material theme provides excellent SEO, mobile responsiveness, and
user experience.
- The git-revision-date-localized plugin shows last modified dates for
each page.
- All existing static assets in `./site/` remain unchanged and will
continue to work.1 parent 21f19d5 commit ef12e07
File tree
4 files changed
+108
-0
lines changed- .github/workflows
4 files changed
+108
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments