Skip to content

Commit 778ac7a

Browse files
committed
Initial MkDocs template for GitHub Pages deployment
Add complete documentation template with Material theme, GitHub Actions workflow for auto-deploy, Python/MkDocs .gitignore, and guides for setup, configuration, customization, and contribution. Includes best practices and pre-configured features for rapid publishing.
0 parents  commit 778ac7a

13 files changed

Lines changed: 1598 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# GitHub Actions workflow for deploying MkDocs to GitHub Pages
2+
# This workflow runs automatically when you push to the main branch
3+
4+
name: Deploy MkDocs to GitHub Pages
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.x'
35+
36+
- name: Cache dependencies
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.cache/pip
40+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
41+
restore-keys: |
42+
${{ runner.os }}-pip-
43+
44+
- name: Install dependencies
45+
run: pip install -r requirements.txt
46+
47+
- name: Build MkDocs site
48+
run: mkdocs build --strict
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: ./site
54+
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Virtual environments
7+
venv/
8+
env/
9+
.venv/
10+
11+
# MkDocs build output
12+
site/
13+
14+
# IDE settings
15+
.idea/
16+
.vscode/
17+
*.swp
18+
*.swo
19+
*~
20+
21+
# OS files
22+
.DS_Store
23+
Thumbs.db
24+
25+
# Local environment files
26+
.env
27+
.env.local
28+
/.vs

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# MkDocs Documentation Template
2+
3+
A user-friendly template for publishing Markdown documentation to GitHub Pages using MkDocs with the Material theme.
4+
5+
## 🚀 Quick Start
6+
7+
### Option 1: Deploy to GitHub Pages (No local setup required)
8+
9+
1. **Enable GitHub Pages**:
10+
- Go to repository **Settings****Pages**
11+
- Set **Source** to **GitHub Actions**
12+
13+
2. **Push to main branch**:
14+
```bash
15+
git add .
16+
git commit -m "Initial documentation"
17+
git push origin main
18+
```
19+
20+
3. **View your site** at: `https://softwareworkercom.github.io/docs/`
21+
22+
### Option 2: Local Development
23+
24+
1. **Install dependencies**:
25+
```bash
26+
python -m venv venv
27+
source venv/bin/activate # Windows: venv\Scripts\activate
28+
pip install -r requirements.txt
29+
```
30+
31+
2. **Start local server**:
32+
```bash
33+
mkdocs serve
34+
```
35+
36+
3. **Open** `http://127.0.0.1:8000` in your browser
37+
38+
## 📁 Project Structure
39+
40+
```
41+
docs/
42+
├── .github/
43+
│ └── workflows/
44+
│ └── deploy.yml # GitHub Actions workflow
45+
├── docs/ # Documentation content
46+
│ ├── index.md # Home page
47+
│ ├── getting-started/ # Getting started guides
48+
│ ├── user-guide/ # User documentation
49+
│ └── contributing.md # Contribution guidelines
50+
├── mkdocs.yml # MkDocs configuration
51+
├── requirements.txt # Python dependencies
52+
└── README.md # This file
53+
```
54+
55+
## ✨ Features
56+
57+
- **Material Design theme** with dark/light mode toggle
58+
- **Automatic deployment** via GitHub Actions
59+
- **Full-text search** for all documentation
60+
- **Code highlighting** with copy button
61+
- **Responsive design** for mobile devices
62+
- **Edit on GitHub** links for easy contributions
63+
64+
## 📝 Writing Documentation
65+
66+
Add new pages by:
67+
68+
1. Creating a `.md` file in the `docs/` folder
69+
2. Adding it to the `nav` section in `mkdocs.yml`
70+
71+
See the [Writing Content](https://softwareworkercom.github.io/docs/user-guide/writing-content/) guide for Markdown tips.
72+
73+
## ⚙️ Configuration
74+
75+
Edit `mkdocs.yml` to customize:
76+
77+
- Site name and description
78+
- Color scheme
79+
- Navigation structure
80+
- Enabled features
81+
82+
## 📚 Documentation
83+
84+
Visit the [documentation site](https://softwareworkercom.github.io/docs/) for detailed guides:
85+
86+
- [Quick Start Guide](https://softwareworkercom.github.io/docs/getting-started/quickstart/)
87+
- [Installation Guide](https://softwareworkercom.github.io/docs/getting-started/installation/)
88+
- [Configuration Guide](https://softwareworkercom.github.io/docs/getting-started/configuration/)
89+
90+
## 📄 License
91+
92+
This project is open source and available under the [MIT License](LICENSE).

docs/contributing.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to this documentation! This guide will help you get started.
4+
5+
## Ways to Contribute
6+
7+
### 🐛 Report Issues
8+
9+
Found an error or have a suggestion?
10+
11+
1. Go to the [Issues](https://github.com/softwareworkercom/docs/issues) page
12+
2. Click **New Issue**
13+
3. Describe the problem or suggestion clearly
14+
15+
### ✏️ Edit on GitHub
16+
17+
The quickest way to fix typos or small errors:
18+
19+
1. Click the **pencil icon** (✏️) at the top of any page
20+
2. Make your changes in the GitHub editor
21+
3. Submit a pull request
22+
23+
### 💻 Local Development
24+
25+
For larger contributions:
26+
27+
1. Fork the repository
28+
2. Clone your fork locally
29+
3. Create a new branch
30+
4. Make your changes
31+
5. Test locally with `mkdocs serve`
32+
6. Submit a pull request
33+
34+
---
35+
36+
## Setting Up Local Development
37+
38+
### Prerequisites
39+
40+
- Python 3.8 or higher
41+
- Git
42+
43+
### Steps
44+
45+
```bash
46+
# Clone your fork
47+
git clone https://github.com/YOUR-USERNAME/docs.git
48+
cd docs
49+
50+
# Create virtual environment
51+
python -m venv venv
52+
source venv/bin/activate # On Windows: venv\Scripts\activate
53+
54+
# Install dependencies
55+
pip install -r requirements.txt
56+
57+
# Start local server
58+
mkdocs serve
59+
```
60+
61+
Visit `http://127.0.0.1:8000` to preview your changes.
62+
63+
---
64+
65+
## Content Guidelines
66+
67+
### Writing Style
68+
69+
- **Be clear and concise** - Avoid jargon when possible
70+
- **Use active voice** - "Click the button" not "The button should be clicked"
71+
- **Address the reader directly** - Use "you" instead of "the user"
72+
- **Include examples** - Show, don't just tell
73+
74+
### Formatting Standards
75+
76+
- Use **sentence case** for headings: "Getting started" not "Getting Started"
77+
- Use **backticks** for code: `code here`
78+
- Use **bold** for UI elements: Click **Save**
79+
- Use **numbered lists** for sequential steps
80+
- Use **bullet points** for non-sequential items
81+
82+
### Code Examples
83+
84+
- Always specify the language for code blocks
85+
- Include comments to explain complex code
86+
- Test all code examples before submitting
87+
88+
````markdown
89+
```python
90+
# Good: Includes language and comments
91+
def greet(name):
92+
"""Return a greeting message."""
93+
return f"Hello, {name}!"
94+
```
95+
````
96+
97+
---
98+
99+
## Pull Request Process
100+
101+
1. **Create a branch** with a descriptive name:
102+
```bash
103+
git checkout -b fix/typo-in-quickstart
104+
git checkout -b feature/add-api-docs
105+
```
106+
107+
2. **Make your changes** and commit with clear messages:
108+
```bash
109+
git commit -m "Fix typo in quickstart guide"
110+
git commit -m "Add API reference documentation"
111+
```
112+
113+
3. **Push to your fork**:
114+
```bash
115+
git push origin your-branch-name
116+
```
117+
118+
4. **Open a pull request** from your fork to the main repository
119+
120+
5. **Wait for review** - Maintainers will review and provide feedback
121+
122+
---
123+
124+
## Questions?
125+
126+
If you have questions about contributing, please:
127+
128+
1. Check existing [Issues](https://github.com/softwareworkercom/docs/issues) for answers
129+
2. Open a new issue if your question isn't addressed
130+
131+
Thank you for helping improve this documentation! 🙏

0 commit comments

Comments
 (0)