Skip to content

Commit 96a5fc0

Browse files
authored
Merge pull request #3 from ChafficPlugins/claude/setup-mkdocs-material-vnOVj
Claude/setup mkdocs material vn o vj
2 parents c34bdca + 2f05c30 commit 96a5fc0

7 files changed

Lines changed: 319 additions & 13 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 82 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,107 @@
1-
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
1+
name: Deploy to GitHub Pages
2+
33
on:
4-
# Runs on pushes targeting the default branch
54
push:
6-
branches: ["main"]
7-
# Allows you to run this workflow manually from the Actions tab
5+
branches: [main]
6+
repository_dispatch:
7+
types: [docs-updated]
88
workflow_dispatch:
9-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
1010
permissions:
1111
contents: read
1212
pages: write
1313
id-token: write
14-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
14+
1615
concurrency:
17-
group: "pages"
16+
group: pages
1817
cancel-in-progress: false
18+
1919
jobs:
20-
# Single deploy job since we're just deploying
2120
deploy:
2221
environment:
2322
name: github-pages
2423
url: ${{ steps.deployment.outputs.page_url }}
2524
runs-on: ubuntu-latest
2625
steps:
27-
- name: Checkout
26+
- name: Checkout website repo
2827
uses: actions/checkout@v4
28+
29+
# --- Pull docs from plugin repos ---
30+
- name: Checkout MyTrip docs
31+
uses: actions/checkout@v4
32+
with:
33+
repository: ChafficPlugins/MyTrip
34+
path: _repos/mytrip
35+
sparse-checkout: docs
36+
37+
- name: Checkout MiningLevels docs
38+
uses: actions/checkout@v4
39+
with:
40+
repository: ChafficPlugins/MiningLevels
41+
path: _repos/mininglevels
42+
sparse-checkout: docs
43+
44+
- name: Checkout CrucialLib docs
45+
uses: actions/checkout@v4
46+
with:
47+
repository: ChafficPlugins/CrucialLib
48+
path: _repos/cruciallib
49+
sparse-checkout: docs
50+
51+
- name: Aggregate docs from all repos
52+
run: |
53+
for repo in mytrip mininglevels cruciallib; do
54+
if [ -d "_repos/$repo/docs" ]; then
55+
mkdir -p "docs/$repo"
56+
cp -r "_repos/$repo/docs/." "docs/$repo/"
57+
echo "Copied docs from $repo"
58+
else
59+
echo "No docs/ folder found in $repo (skipping)"
60+
fi
61+
done
62+
echo ""
63+
echo "Final docs structure:"
64+
find docs -type f -name "*.md" | sort
65+
66+
# --- Build MkDocs ---
67+
- name: Setup Python
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: 3.x
71+
72+
- name: Cache pip
73+
uses: actions/cache@v4
74+
with:
75+
key: mkdocs-material-${{ hashFiles('mkdocs.yml') }}
76+
path: ~/.cache
77+
restore-keys: mkdocs-material-
78+
79+
- name: Install MkDocs Material
80+
run: pip install mkdocs-material
81+
82+
- name: Build docs
83+
run: mkdocs build --strict
84+
85+
# --- Combine landing page + docs into one artifact ---
86+
- name: Assemble site
87+
run: |
88+
mkdir _site
89+
# Landing page files
90+
cp index.html _site/
91+
cp redirect.html _site/
92+
cp -r style _site/
93+
cp -r img _site/
94+
# MkDocs output → /docs/
95+
mv site _site/docs
96+
2997
- name: Setup Pages
3098
uses: actions/configure-pages@v5
99+
31100
- name: Upload artifact
32101
uses: actions/upload-pages-artifact@v3
33102
with:
34-
# Upload entire repository
35-
path: '.'
103+
path: _site
104+
36105
- name: Deploy to GitHub Pages
37106
id: deployment
38107
uses: actions/deploy-pages@v4

docs/contributing.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to ChafficPlugins!
4+
5+
## Reporting Bugs
6+
7+
The best way to report bugs is through our [Discord](https://discord.gg/RYFamQzkcB) in the `#bug-reports` channel, or by opening a GitHub Issue in the relevant repository.
8+
9+
Please include:
10+
11+
- Plugin and server version
12+
- Steps to reproduce
13+
- Expected vs. actual behavior
14+
- Server logs or stacktraces
15+
16+
## Feature Requests
17+
18+
Post in `#feature-requests` on Discord or open a GitHub Issue with the `feature` label.
19+
20+
## Code Contributions
21+
22+
1. Fork the repository
23+
2. Create a feature branch: `git checkout -b feature/my-feature`
24+
3. Make your changes and write tests
25+
4. Open a Pull Request and allow edits from maintainers
26+
5. Await review
27+
28+
### Documentation
29+
30+
Docs live in the `docs/` folder of each repository as Markdown files. If your change affects user-facing behavior, please update the docs too.
31+
32+
## Repositories
33+
34+
| Repo | Description |
35+
|------|-------------|
36+
| [CrucialLib](https://github.com/ChafficPlugins/CrucialLib) | Shared library (fork of CrucialAPI) |
37+
| [MyTrip](https://github.com/ChafficPlugins/MyTrip) | Drug plugin |
38+
| [MiningLevels](https://github.com/ChafficPlugins/MiningLevels) | Mining progression |

docs/getting-started.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Getting Started
2+
3+
## Requirements
4+
5+
All ChafficPlugins require:
6+
7+
- **Java 16+**
8+
- **Spigot** or **Paper** server (1.18+)
9+
- **CrucialLib** (shared library, required by all plugins)
10+
11+
## Installation
12+
13+
### 1. Install CrucialLib
14+
15+
Download the latest release from [GitHub Releases](https://github.com/ChafficPlugins/CrucialLib/releases) and place the `.jar` in your server's `plugins/` folder.
16+
17+
!!! tip "Auto-Download"
18+
Our plugins can automatically download CrucialLib if it's missing. However, we recommend installing it manually to control the version.
19+
20+
### 2. Install Your Plugin
21+
22+
Download the plugin you want:
23+
24+
- **MyTrip**: [SpigotMC](https://www.spigotmc.org/resources/mytrip-amazing-drugs-in-minecraft.76816/) or [GitHub Releases](https://github.com/ChafficPlugins/MyTrip/releases)
25+
- **MiningLevels**: [SpigotMC](https://www.spigotmc.org/resources/mininglevels.100886/) or [GitHub Releases](https://github.com/ChafficPlugins/MiningLevels/releases)
26+
27+
Place the `.jar` in your `plugins/` folder and restart the server.
28+
29+
### 3. Configure
30+
31+
Each plugin creates a default configuration in `plugins/<PluginName>/config.yml` on first startup. See the individual plugin docs for configuration details.
32+
33+
## For Developers
34+
35+
If you want to use our plugins as dependencies in your own plugin, see the [CrucialLib Setup Guide](cruciallib/setup.md) and the individual plugin API docs.

docs/index.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# ChafficPlugins
2+
3+
Welcome to the official documentation for **ChafficPlugins** – open-source roleplay-focused Minecraft server plugins, actively maintained since 2019.
4+
5+
## Our Plugins
6+
7+
<div class="grid cards" markdown>
8+
9+
- :fontawesome-solid-pills: **MyTrip**
10+
11+
---
12+
13+
Custom drugs for Minecraft. Create substances with unique crafting recipes, effects, and prices.
14+
15+
[:octicons-arrow-right-24: MyTrip Docs](mytrip/index.md)
16+
17+
- :fontawesome-solid-pickaxe: **MiningLevels**
18+
19+
---
20+
21+
Progression-based mining. Players gain XP, level up, and unlock access to higher-tier ores and tools.
22+
23+
[:octicons-arrow-right-24: MiningLevels Docs](mininglevels/index.md)
24+
25+
- :fontawesome-solid-gears: **CrucialLib**
26+
27+
---
28+
29+
Shared library used across all plugins. Handles common utilities, configs, and version management.
30+
31+
[:octicons-arrow-right-24: CrucialLib Docs](cruciallib/index.md)
32+
33+
</div>
34+
35+
## Quick Links
36+
37+
- **Discord**: [Join our server](https://discord.gg/RYFamQzkcB) for support and feature requests
38+
- **SpigotMC**: [MyTrip](https://www.spigotmc.org/resources/mytrip-amazing-drugs-in-minecraft.76816/) · [MiningLevels](https://www.spigotmc.org/resources/mininglevels.100886/)
39+
- **GitHub**: [ChafficPlugins Organization](https://github.com/ChafficPlugins)

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
</div>
2121
<h1 class="hero-title">ChafficPlugins</h1>
2222
<p class="hero-subtitle">Open-source Minecraft server plugins, actively maintained since 2019.</p>
23+
<a class="hero-docs-link" href="/docs/">
24+
Read the Docs
25+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75 0 010 1.08l-5.5 5.25a.75.75 0 11-1.04-1.08l4.158-3.96H3.75A.75.75 0 013 10z" clip-rule="evenodd"/></svg>
26+
</a>
2327
</header>
2428

2529
<!-- Plugins -->
@@ -117,6 +121,7 @@ <h2 class="section-title">At a Glance</h2>
117121
<!-- Footer -->
118122
<footer class="site-footer fade-in fade-in-delay-4">
119123
<div class="footer-links">
124+
<a class="footer-link" href="/docs/">Docs</a>
120125
<a class="footer-link" href="https://felixbeinssen.net/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
121126
<a class="footer-link" href="https://github.com/ChafficPlugins" target="_blank" rel="noopener noreferrer">GitHub</a>
122127
</div>

mkdocs.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
site_name: ChafficPlugins Docs
2+
site_url: https://chafficplugins.github.io/docs/
3+
site_description: Documentation for ChafficPlugins – Open-source Minecraft server plugins
4+
repo_url: https://github.com/ChafficPlugins
5+
repo_name: ChafficPlugins
6+
7+
theme:
8+
name: material
9+
palette:
10+
- scheme: slate
11+
primary: deep purple
12+
accent: amber
13+
toggle:
14+
icon: material/brightness-4
15+
name: Switch to light mode
16+
- scheme: default
17+
primary: deep purple
18+
accent: amber
19+
toggle:
20+
icon: material/brightness-7
21+
name: Switch to dark mode
22+
font:
23+
text: Source Sans Pro
24+
code: JetBrains Mono
25+
icon:
26+
repo: fontawesome/brands/github
27+
features:
28+
- navigation.tabs
29+
- navigation.sections
30+
- navigation.expand
31+
- navigation.top
32+
- search.suggest
33+
- search.highlight
34+
- content.code.copy
35+
- content.tabs.link
36+
37+
plugins:
38+
- search
39+
40+
markdown_extensions:
41+
- admonition
42+
- pymdownx.details
43+
- pymdownx.superfences
44+
- pymdownx.tabbed:
45+
alternate_style: true
46+
- pymdownx.highlight:
47+
anchor_linenums: true
48+
- pymdownx.inlinehilite
49+
- pymdownx.snippets
50+
- attr_list
51+
- md_in_html
52+
- toc:
53+
permalink: true
54+
55+
extra:
56+
social:
57+
- icon: fontawesome/brands/github
58+
link: https://github.com/ChafficPlugins
59+
- icon: fontawesome/brands/discord
60+
link: https://discord.gg/RYFamQzkcB
61+
62+
copyright: "&copy; 2019–2026 ChafficPlugins"
63+
64+
nav:
65+
- Home: index.md
66+
- Getting Started: getting-started.md
67+
- Plugins:
68+
- MyTrip:
69+
- Overview: mytrip/index.md
70+
- Installation: mytrip/installation.md
71+
- Configuration: mytrip/configuration.md
72+
- Commands & Permissions: mytrip/commands.md
73+
- API: mytrip/api.md
74+
- MiningLevels:
75+
- Overview: mininglevels/index.md
76+
- Installation: mininglevels/installation.md
77+
- Configuration: mininglevels/configuration.md
78+
- Commands & Permissions: mininglevels/commands.md
79+
- API: mininglevels/api.md
80+
- CrucialLib:
81+
- Overview: cruciallib/index.md
82+
- Setup: cruciallib/setup.md
83+
- API Guide: cruciallib/api-guide.md
84+
- Migrations: cruciallib/migrations.md
85+
- Javadoc: cruciallib/javadoc.md
86+
- Contributing: contributing.md

style/main.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,40 @@ body {
156156
margin: 0 auto;
157157
}
158158

159+
.hero-docs-link {
160+
display: inline-flex;
161+
align-items: center;
162+
gap: 0.5rem;
163+
margin-top: 1.5rem;
164+
font-size: 0.9375rem;
165+
font-weight: 600;
166+
color: var(--color-accent-light);
167+
text-decoration: none;
168+
padding: 0.625rem 1.5rem;
169+
border-radius: 100px;
170+
border: 1px solid rgba(217, 70, 239, 0.3);
171+
background: var(--color-accent-subtle);
172+
transition: all var(--transition);
173+
}
174+
175+
.hero-docs-link:hover {
176+
background: rgba(217, 70, 239, 0.15);
177+
border-color: var(--color-accent-light);
178+
color: var(--color-white);
179+
box-shadow: 0 0 20px var(--color-accent-glow);
180+
gap: 0.75rem;
181+
}
182+
183+
.hero-docs-link svg {
184+
width: 16px;
185+
height: 16px;
186+
transition: transform var(--transition);
187+
}
188+
189+
.hero-docs-link:hover svg {
190+
transform: translateX(2px);
191+
}
192+
159193
/* --- Section --- */
160194
.section {
161195
padding: 2rem 0;

0 commit comments

Comments
 (0)