Skip to content

Commit

Permalink
docs: Set up initial documentation structure (#5) (#6)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Chafficui and Chafficui authored Nov 19, 2024
1 parent b671153 commit 92a83a6
Show file tree
Hide file tree
Showing 16 changed files with 287 additions and 16 deletions.
9 changes: 9 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 6 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
26 changes: 26 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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)
17 changes: 17 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 9 additions & 0 deletions docs/api/commands.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions docs/api/configuration.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions docs/api/database.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions docs/api/effects.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions docs/api/events.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions docs/api/gui.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions docs/api/items.md
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions docs/api/overview.md
Original file line number Diff line number Diff line change
@@ -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.
51 changes: 51 additions & 0 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
@@ -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
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.github.chafficplugins</groupId>
<artifactId>ChafficLib</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>
```

## 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
60 changes: 60 additions & 0 deletions docs/guide/installation.md
Original file line number Diff line number Diff line change
@@ -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
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.github.chafficplugins</groupId>
<artifactId>ChafficLib</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>
```

## 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)

0 comments on commit 92a83a6

Please sign in to comment.