From 92a83a6261852efb48d1b3bf654eac7a08e4bccd Mon Sep 17 00:00:00 2001 From: Felix Beinssen Date: Tue, 19 Nov 2024 14:46:10 +0100 Subject: [PATCH] docs: Set up initial documentation structure (#5) (#6) * docs: set up initial documentation structure - Added GitBook configuration - Created documentation outline - Added getting started guide - Added installation guide - Set up API documentation structure - Added placeholder pages for future content * docs(ci): add documentation deployment to GitHub Pages - Configure GitHub Pages deployment - Include both Dokka and GitBook documentation - Update permissions for Pages deployment * docs: set up initial documentation structure - Added GitBook configuration and outline - Created getting started and installation guides - Added API documentation structure with placeholders - Set up KDoc/Dokka configuration Closes #5 * fix(docs): remove ./docs from dokka upload * chore(ci): remove pages deployment from build workflow --------- Co-authored-by: Chafficui --- .gitbook.yaml | 9 ++++++ .github/workflows/build.yml | 21 ++++-------- CHANGELOG.md | 3 ++ README.md | 2 +- docs/README.md | 26 +++++++++++++++ docs/SUMMARY.md | 17 ++++++++++ docs/api/commands.md | 9 ++++++ docs/api/configuration.md | 9 ++++++ docs/api/database.md | 9 ++++++ docs/api/effects.md | 9 ++++++ docs/api/events.md | 9 ++++++ docs/api/gui.md | 9 ++++++ docs/api/items.md | 9 ++++++ docs/api/overview.md | 51 +++++++++++++++++++++++++++++ docs/guide/getting-started.md | 51 +++++++++++++++++++++++++++++ docs/guide/installation.md | 60 +++++++++++++++++++++++++++++++++++ 16 files changed, 287 insertions(+), 16 deletions(-) create mode 100644 .gitbook.yaml create mode 100644 docs/README.md create mode 100644 docs/SUMMARY.md create mode 100644 docs/api/commands.md create mode 100644 docs/api/configuration.md create mode 100644 docs/api/database.md create mode 100644 docs/api/effects.md create mode 100644 docs/api/events.md create mode 100644 docs/api/gui.md create mode 100644 docs/api/items.md create mode 100644 docs/api/overview.md create mode 100644 docs/guide/getting-started.md create mode 100644 docs/guide/installation.md diff --git a/.gitbook.yaml b/.gitbook.yaml new file mode 100644 index 0000000..9e3586a --- /dev/null +++ b/.gitbook.yaml @@ -0,0 +1,9 @@ +root: ./docs + +structure: + readme: README.md + summary: SUMMARY.md + +redirects: + guide/getting-started: ./guide/getting-started.md + api/overview: ./api/overview.md \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 423cbb8..4b112d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,10 +10,15 @@ permissions: contents: read checks: write pull-requests: write + pages: write + id-token: write jobs: build: runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v4 @@ -45,18 +50,4 @@ jobs: fail_ci_if_error: false - name: Generate Documentation - run: ./gradlew dokkaHtml --no-daemon - - - name: Archive documentation - uses: actions/upload-artifact@v4 - with: - name: documentation - path: build/dokka/html/ - retention-days: 14 - - - name: Check Code Coverage - run: | - ./gradlew jacocoTestCoverageVerification --no-daemon || { - echo "Code coverage is below 80%" - exit 1 - } + run: ./gradlew dokkaHtml --no-daemon \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f54aa97..77e2ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Test utilities for common testing scenarios - Example tests verifying framework functionality - Comprehensive test logging configuration +- Initial documentation structure with GitBook configuration +- Getting started guide and installation instructions +- API documentation placeholders for future content ## [0.0.1] - 2024-11-17 diff --git a/README.md b/README.md index 405263e..2f47f65 100644 --- a/README.md +++ b/README.md @@ -91,5 +91,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file - 🌐 [Website](https://felixbeinssen.net) - 📚 [Documentation](https://chafficplugins.gitbook.io/chafficlib/) -- 💬 [Discord](https://discord.gg/XXXXX) +- 💬 [Discord](https://discord.gg/RPZBhB4rna) - 🐛 [Issue Tracker](https://github.com/chafficplugins/ChafficLib/issues) \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..06dd975 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,26 @@ +# ChafficLib Documentation + +Welcome to the ChafficLib documentation! This guide will help you get started with using ChafficLib in your Spigot plugins. + +## Quick Links + +- [Getting Started](guide/getting-started.md) +- [API Reference](api/overview.md) +- [GitHub Repository](https://github.com/chafficplugins/ChafficLib) + +## Features + +- 🎮 GUI System - Create intuitive inventory interfaces +- ⚙️ Configuration System - Type-safe configuration handling +- 💾 Database System - Easy database integration +- 🛠️ Item System - Streamlined item creation +- ✨ Effects System - Particle and sound effects +- 📝 Event System - Simplified event handling +- 🎯 Command System - Annotation-based commands + +## Support + +Need help? Check our: +- [Discord Server](https://discord.gg/RPZBhB4rna) +- [Issue Tracker](https://github.com/chafficplugins/ChafficLib/issues) +- [API Documentation](api/overview.md) \ No newline at end of file diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..0b1d6b9 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,17 @@ +# Table of contents + +* [Introduction](README.md) + +## Guide +* [Getting Started](guide/getting-started.md) +* [Installation](guide/installation.md) + +## API Reference +* [Overview](api/overview.md) +* [GUI System](api/gui.md) +* [Configuration](api/configuration.md) +* [Database](api/database.md) +* [Items](api/items.md) +* [Effects](api/effects.md) +* [Events](api/events.md) +* [Commands](api/commands.md) \ No newline at end of file diff --git a/docs/api/commands.md b/docs/api/commands.md new file mode 100644 index 0000000..7188988 --- /dev/null +++ b/docs/api/commands.md @@ -0,0 +1,9 @@ +# Command System + +The command system documentation will be available once the feature is implemented. + +Stay tuned for: +- Command creation +- Argument parsing +- Tab completion +- Permission handling \ No newline at end of file diff --git a/docs/api/configuration.md b/docs/api/configuration.md new file mode 100644 index 0000000..6a93fe8 --- /dev/null +++ b/docs/api/configuration.md @@ -0,0 +1,9 @@ +# Configuration System + +The configuration system documentation will be available once the feature is implemented. + +Stay tuned for: +- YAML configuration +- Type-safe config +- Auto-reloading +- Migration system diff --git a/docs/api/database.md b/docs/api/database.md new file mode 100644 index 0000000..09cc9a4 --- /dev/null +++ b/docs/api/database.md @@ -0,0 +1,9 @@ +# Database System + +The database system documentation will be available once the feature is implemented. + +Stay tuned for: +- Connection pooling +- Query building +- Entity mapping +- Migration support diff --git a/docs/api/effects.md b/docs/api/effects.md new file mode 100644 index 0000000..653b9ff --- /dev/null +++ b/docs/api/effects.md @@ -0,0 +1,9 @@ +# Effects System + +The effects system documentation will be available once the feature is implemented. + +Stay tuned for: +- Particle effects +- Sound effects +- Visual effects +- Animation system \ No newline at end of file diff --git a/docs/api/events.md b/docs/api/events.md new file mode 100644 index 0000000..636390b --- /dev/null +++ b/docs/api/events.md @@ -0,0 +1,9 @@ +# Event System + +The event system documentation will be available once the feature is implemented. + +Stay tuned for: +- Event handling +- Priority system +- Filtering +- Custom events \ No newline at end of file diff --git a/docs/api/gui.md b/docs/api/gui.md new file mode 100644 index 0000000..f589897 --- /dev/null +++ b/docs/api/gui.md @@ -0,0 +1,9 @@ +# GUI System + +The GUI system documentation will be available once the feature is implemented. + +Stay tuned for: +- Inventory creation +- Click handling +- Pagination +- Templates \ No newline at end of file diff --git a/docs/api/items.md b/docs/api/items.md new file mode 100644 index 0000000..9927510 --- /dev/null +++ b/docs/api/items.md @@ -0,0 +1,9 @@ +# Item System + +The item system documentation will be available once the feature is implemented. + +Stay tuned for: +- Item building +- NBT handling +- Serialization +- Templates \ No newline at end of file diff --git a/docs/api/overview.md b/docs/api/overview.md new file mode 100644 index 0000000..192cf6c --- /dev/null +++ b/docs/api/overview.md @@ -0,0 +1,51 @@ +# API Overview + +ChafficLib provides several core systems to help you develop Spigot plugins more efficiently. This documentation is currently under development and will be expanded as features are implemented. + +## Core Systems + +### GUI System +Create and manage inventory GUIs with a fluent builder API. +```kotlin +// Example code will be added once implemented +``` + +### Configuration System +Type-safe configuration handling with automatic reloading. +```kotlin +// Example code will be added once implemented +``` + +### Database System +Easy database integration with connection pooling and query building. +```kotlin +// Example code will be added once implemented +``` + +### Item System +Create and modify items with a builder pattern. +```kotlin +// Example code will be added once implemented +``` + +### Effects System +Handle particles, sounds, and visual effects. +```kotlin +// Example code will be added once implemented +``` + +### Event System +Simplified event handling with Kotlin DSL. +```kotlin +// Example code will be added once implemented +``` + +### Command System +Annotation-based command creation with argument parsing. +```kotlin +// Example code will be added once implemented +``` + +## API Documentation + +Detailed API documentation will be available once features are implemented. Each system will have its own dedicated page with comprehensive examples and usage guidelines. \ No newline at end of file diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md new file mode 100644 index 0000000..490fe1a --- /dev/null +++ b/docs/guide/getting-started.md @@ -0,0 +1,51 @@ +# Getting Started with ChafficLib + +ChafficLib is a modern Spigot library designed to streamline plugin development. This guide will help you get started with using ChafficLib in your projects. + +## Requirements + +- Java 21 or higher +- Spigot 1.20.x - 1.21.x +- Gradle or Maven build system + +## Installation + +### Gradle (Kotlin DSL) +```kotlin +repositories { + mavenCentral() + maven("https://jitpack.io") +} + +dependencies { + implementation("com.github.chafficplugins:ChafficLib:VERSION") +} +``` + +### Maven +```xml + + + jitpack.io + https://jitpack.io + + + + + + com.github.chafficplugins + ChafficLib + VERSION + + +``` + +## Basic Usage + +More examples and detailed API documentation will be added as features are implemented. + +## Next Steps + +- Check out our [API Reference](../api/overview.md) +- View examples in the [GitHub repository](https://github.com/chafficplugins/ChafficLib) +- Join our [Discord](https://discord.gg/RPZBhB4rna) for support \ No newline at end of file diff --git a/docs/guide/installation.md b/docs/guide/installation.md new file mode 100644 index 0000000..c691d6d --- /dev/null +++ b/docs/guide/installation.md @@ -0,0 +1,60 @@ +# Installation + +ChafficLib can be included in your project using either Gradle or Maven. + +## Requirements + +- Java 21 or higher +- Spigot 1.20.x - 1.21.x +- Gradle or Maven build system + +## Adding the Dependency + +### Gradle (Kotlin DSL) + +Add the following to your `build.gradle.kts`: + +```kotlin +repositories { + mavenCentral() + maven("https://jitpack.io") +} + +dependencies { + implementation("com.github.chafficplugins:ChafficLib:VERSION") +} +``` + +### Maven + +Add the following to your `pom.xml`: + +```xml + + + jitpack.io + https://jitpack.io + + + + + + com.github.chafficplugins + ChafficLib + VERSION + + +``` + +## Verifying Installation + +To verify that ChafficLib is properly installed: + +1. Build your project +2. Check that ChafficLib is included in your plugin's dependencies +3. Test loading your plugin on a Spigot server + +## Next Steps + +- Check out the [Getting Started Guide](getting-started.md) +- View the [API Documentation](../api/overview.md) \ No newline at end of file