Skip to content

Commit 170776a

Browse files
committed
add: integration to documentation site
1 parent fcdcf38 commit 170776a

38 files changed

Lines changed: 12647 additions & 2 deletions

.github/workflows/deploy-docs.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Deploy Starlight site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
# 🟢 Cache npm dependencies
30+
cache: 'npm'
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
# 🟢 Cache node_modules (backup npm cache)
36+
- name: Cache node_modules
37+
uses: actions/cache@v4
38+
with:
39+
path: docs/node_modules
40+
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
41+
restore-keys: |
42+
${{ runner.os }}-node-modules-
43+
44+
# 🟢 Cache Astro build output
45+
- name: Cache Astro build
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
docs/.astro
50+
docs/dist
51+
key: ${{ runner.os }}-astro-build-${{ github.sha }}
52+
restore-keys: |
53+
${{ runner.os }}-astro-build-
54+
55+
# 🟢 Cache contributors data
56+
- name: Cache Contributors Data
57+
uses: actions/cache@v4
58+
with:
59+
path: docs/cache
60+
key: ${{ runner.os }}-contributors-${{ github.repository }}-${{ github.run_number }}
61+
restore-keys: |
62+
${{ runner.os }}-contributors-${{ github.repository }}-
63+
64+
- name: Install dependencies
65+
run: |
66+
if [ -d "docs/node_modules" ]; then
67+
echo "Using cached node_modules"
68+
npm ci --prefer-offline --no-audit
69+
else
70+
echo "Installing fresh dependencies"
71+
npm ci
72+
fi
73+
74+
- name: Build site
75+
env:
76+
# 🟢 GitHub token (rate limit 1000/hour)
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
run: npm run build
79+
80+
- name: Upload artifact
81+
uses: actions/upload-pages-artifact@v3
82+
with:
83+
path: ./docs/dist
84+
85+
deploy:
86+
environment:
87+
name: github-pages
88+
url: ${{ steps.deployment.outputs.page_url }}
89+
runs-on: ubuntu-latest
90+
needs: build
91+
steps:
92+
- name: Deploy to GitHub Pages
93+
id: deployment
94+
uses: actions/deploy-pages@v4

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ allprojects {
1010
apply(plugin = "maven-publish")
1111

1212
group = "github.nighter"
13-
version = "1.6.1"
13+
version = "1.6.2"
1414

1515
repositories {
1616
mavenCentral()

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ tasks.shadowJar {
103103

104104
mergeServiceFiles()
105105

106-
destinationDirectory.set(file("C:\\Users\\USER\\Desktop\\TestServer\\plugins"))
106+
// destinationDirectory.set(file("C:\\Users\\USER\\Desktop\\TestServer\\plugins"))
107107
}
108108

109109
tasks.build {

docs/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
#idea
24+
.vscode

docs/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Nighter Development
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docs/README.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
2+
# SmartSpawner Documentation
3+
4+
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5+
[![Astro](https://img.shields.io/badge/Astro-5.13.2-orange)](https://astro.build/)
6+
[![Starlight](https://img.shields.io/badge/Starlight-0.35.2-purple)](https://starlight.astro.build/)
7+
8+
This repository hosts the official documentation website for **[SmartSpawner](https://modrinth.com/plugin/smart-spawner-plugin)**, a powerful Minecraft plugin designed to enhance mob spawner management on servers.
9+
10+
## About SmartSpawner
11+
12+
SmartSpawner is a feature-rich plugin that simplifies and enhances the management of mob spawners in Minecraft servers. It offers advanced customization options, seamless integrations with popular plugins, and a robust developer API for extending functionality. Notably, its GUI-based system generates mob drops and experience without spawning entities, significantly boosting server performance.
13+
14+
## Site Overview
15+
16+
- **Framework**: Astro with Starlight theme
17+
- **Version**: 0.0.1
18+
- **Primary Dependencies**:
19+
- Astro (^5.13.2)
20+
- @astrojs/starlight (^0.35.2)
21+
- Starlight themes (Catppuccin, Next, Obsidian)
22+
- Sharp (^0.34.2)
23+
24+
## Quick Start
25+
26+
### Prerequisites
27+
- Node.js (version 18 or higher)
28+
- npm or yarn package manager
29+
30+
### Local Development
31+
32+
1. **Clone the repository**:
33+
```bash
34+
git clone https://github.com/NighterDevelopment/smartspawner-docs.git
35+
cd smartspawner-docs
36+
```
37+
38+
2. **Install dependencies**:
39+
```bash
40+
npm install
41+
```
42+
43+
3. **Start the development server**:
44+
```bash
45+
npm run dev
46+
```
47+
The site will be available at `http://localhost:4321`.
48+
49+
### Build and Preview
50+
51+
- **Build for production**:
52+
```bash
53+
npm run build
54+
```
55+
56+
- **Preview the production build**:
57+
```bash
58+
npm run preview
59+
```
60+
61+
## Project Structure
62+
63+
```
64+
smartspawner-docs/
65+
├── src/
66+
│ ├── content/
67+
│ │ ├── docs/ # Main documentation files (Markdown/MDX)
68+
│ │ └── config.ts # Content configuration
69+
│ ├── components/ # Custom Astro components
70+
│ ├── styles/ # Custom CSS styles
71+
│ └── assets/ # Static assets
72+
├── public/ # Public static files
73+
├── astro.config.mjs # Astro configuration
74+
├── package.json # Project dependencies and scripts
75+
└── tsconfig.json # TypeScript configuration
76+
```
77+
78+
## Contributing
79+
80+
We appreciate contributions from the community! Whether you're fixing a typo, adding new documentation, or improving the site's functionality, your input is valuable.
81+
82+
### Contribution Guidelines
83+
84+
1. **Fork the repository** on GitHub.
85+
2. **Create a feature branch**:
86+
```bash
87+
git checkout -b feature/your-feature-name
88+
```
89+
3. **Make your changes**:
90+
- Documentation updates go in `src/content/docs/`
91+
- Component changes in `src/components/`
92+
- Style modifications in `src/styles/`
93+
4. **Test your changes** locally using `npm run dev`.
94+
5. **Update timestamps for documentation files** (if you modified any `.md` files in `src/content/docs/`):
95+
96+
```bash
97+
npm run add-timestamps
98+
```
99+
This command automatically updates the "Last update" timestamp at the end of each modified documentation file based on its last modification time. This ensures accurate update information for readers
100+
6. **Commit your changes** with descriptive messages:
101+
```bash
102+
git commit -m "Add comprehensive guide for plugin integrations"
103+
```
104+
7. **Push to your fork** and **create a pull request**.
105+
106+
### Code Style
107+
- Follow existing Markdown formatting and structure.
108+
- Use clear, concise language suitable for both beginners and advanced users.
109+
- Include code examples where applicable.
110+
- Test all links and ensure they are functional.
111+
112+
For significant changes or new features, please open an issue first to discuss the proposed modifications.
113+
114+
## Deployment
115+
116+
This site is configured for deployment to GitHub Pages:
117+
118+
```bash
119+
npm run deploy
120+
```
121+
122+
This command builds the site and deploys it using `gh-pages`.
123+
124+
## License
125+
126+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
127+
128+
## Support and Contact
129+
130+
- **Issues**: Report bugs or request features via [GitHub Issues](https://github.com/NighterDevelopment/smartspawner-docs/issues)
131+
- **Discussions**: Join community discussions on [Discord Server](https://dsc.gg/nighterdevelopment)
132+
133+
For questions about the SmartSpawner plugin itself, please refer to the main plugin repository or community channels.
134+
135+
---
136+
137+
*Built with ❤️ using Astro and Starlight*

docs/astro.config.mjs

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
import catppuccin from "@catppuccin/starlight";
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
site: 'https://nighterdevelopment.github.io/SmartSpawner/',
9+
base: '/SmartSpawner/',
10+
integrations: [
11+
starlight({
12+
plugins: [
13+
catppuccin({
14+
15+
}),
16+
],
17+
title: 'SmartSpawner Documentation',
18+
customCss: [
19+
'./src/styles/custom.css',
20+
],
21+
description: 'A customizable spawner GUI plugin that generates mob drops and experience directly, without spawning mobs',
22+
favicon: './Spawner.png',
23+
// logo: {
24+
// src: './src/assets/logo.png',
25+
// },
26+
social: [
27+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/NighterDevelopment/SmartSpawner' },
28+
{ icon: 'discord', label: 'Discord', href: 'https://discord.gg/zrnyG4CuuT' },
29+
],
30+
components: {
31+
Footer: './src/overrides/Footer.astro',
32+
},
33+
sidebar: [
34+
{
35+
label: 'Getting Started',
36+
items: [
37+
{ label: 'Installation', slug: 'installation' },
38+
{ label: 'Features Overview', slug: 'features' },
39+
],
40+
},
41+
{
42+
label: 'User Guide',
43+
items: [
44+
{ label: 'Commands', slug: 'commands' },
45+
{ label: 'Permissions', slug: 'permissions' },
46+
],
47+
},
48+
{
49+
label: 'Configuration',
50+
items: [
51+
{ label: 'config.yml', slug: 'configuration' },
52+
{ label: 'spawners_settings.yml', slug: 'spawners_settings' },
53+
{ label: 'item_spawners_settings.yml', slug: 'item_spawners_settings' },
54+
],
55+
},
56+
{
57+
label: 'Integrations',
58+
items: [
59+
{ label: 'Plugin Compatibility', slug: 'plugin-compatibility' },
60+
{
61+
label: 'Setup Guides',
62+
collapsed: false,
63+
items: [
64+
{ label: 'MythicMobs', slug: 'integrations/mythicmobs' },
65+
{ label: 'SuperiorSkyblock2', slug: 'integrations/superiorskyblock2' },
66+
{ label: 'SimpleClaimSystem', slug: 'integrations/simpleclaimsystem' },
67+
],
68+
},
69+
],
70+
},
71+
{
72+
label: 'Developer API',
73+
collapsed: false,
74+
items: [
75+
{ label: 'API Installation', slug: 'developer-api/api-installation' },
76+
{ label: 'API Events', slug: 'developer-api/api-events' },
77+
{
78+
label: 'API Methods',
79+
collapsed: false,
80+
items: [
81+
{ label: 'Creation Methods', slug: 'developer-api/api-creation' },
82+
{ label: 'Validation Methods', slug: 'developer-api/api-validation' },
83+
{ label: 'Spawner Data Methods', slug: 'developer-api/api-data-access' },
84+
{ label: 'Methods Examples', slug: 'developer-api/api-examples' },
85+
],
86+
},
87+
],
88+
},
89+
],
90+
}),
91+
],
92+
});

0 commit comments

Comments
 (0)