docs: add Docusaurus documentation site with GitHub Actions deployment#36
docs: add Docusaurus documentation site with GitHub Actions deployment#36selcukgural merged 1 commit intomainfrom
Conversation
- Add comprehensive documentation site in docs/ folder (21 pages) - Getting Started: Installation, Quick Start, Why SGuard - Core Concepts: Guard methods, Callbacks, Custom Exceptions, Expression Caching - Guides: Null/Empty checks, Comparisons, Collections, Strings, Real-world examples - Advanced: Performance, Best Practices - API Reference: ThrowIf, Is, Callbacks - Community: Contributing, Code of Conduct, Changelog - Add GitHub Actions workflow for automatic deployment to gh-pages - Update README.md with documentation links - Remove broken coverage badge from README - Configure Docusaurus with SGuard branding and metadata - Add .gitignore entries for Docusaurus build artifacts Documentation will be available at: https://selcukgural.github.io/SGuard/
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive Docusaurus-based documentation site for the SGuard library, replacing the previous static HTML page. The documentation will be automatically deployed to GitHub Pages at https://selcukgural.github.io/SGuard/.
Changes:
- Complete Docusaurus documentation site with 21 pages covering getting started, core concepts, guides, advanced topics, API reference, and community content
- GitHub Actions workflow for automatic deployment to gh-pages branch
- Updated .gitignore entries for Docusaurus build artifacts
Reviewed changes
Copilot reviewed 34 out of 45 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/deploy-docs.yml |
New workflow for automatic documentation deployment to GitHub Pages |
.gitignore |
Added Docusaurus build artifacts to ignore list |
docs/ folder |
Complete Docusaurus site structure with configuration, content, and assets |
docs/docusaurus.config.js |
Docusaurus configuration with SGuard branding and GitHub Pages settings |
docs/package.json |
Dependencies for Docusaurus 3.9.2, React 19, and related packages |
docs/docs/ |
21 markdown documentation pages organized by category |
docs/static/ |
Static assets including logos, icons, and SVG illustrations |
docs/index.html |
Removed old static HTML documentation (replaced by Docusaurus) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future | ||
| future: { | ||
| v4: true, // Improve compatibility with the upcoming Docusaurus v4 | ||
| }, | ||
|
|
There was a problem hiding this comment.
The future.v4 flag is set to true which opts into experimental Docusaurus v4 features. While this may improve forward compatibility, it could introduce breaking changes or unexpected behavior with the current Docusaurus v3.9.2. Consider removing this flag or documenting the reason for its inclusion, as the current installed version is 3.9.2 (from package.json) and v4 is still in development.
| // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future | |
| future: { | |
| v4: true, // Improve compatibility with the upcoming Docusaurus v4 | |
| }, |
| # Website | ||
|
|
||
| This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| yarn | ||
| ``` | ||
|
|
There was a problem hiding this comment.
The PR description mentions "Update README.md with documentation links" but there are no links to the new documentation site (https://selcukgural.github.io/SGuard/) added to the README.md file. Consider adding a prominent section linking to the new documentation site so users can easily discover it.
| # Website | ||
|
|
||
| This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
|
There was a problem hiding this comment.
The PR description states "Remove broken coverage badge from README" but the coverage badge is still present in the README.md file at line 4. If the badge is broken, it should be removed. If it's working, the PR description should be updated to reflect this.
| ## Expressive, Dual API | ||
|
|
||
| Choose the style that fits your code: | ||
|
|
||
| - **`Is.*`** returns booleans for control-flow friendly checks | ||
| - **`ThrowIf.*`** fails fast with informative exceptions when rules are violated | ||
|
|
There was a problem hiding this comment.
Grammatical error: "ThrowIf.* it fails fast" should be "ThrowIf.* fails fast" (remove "it")
| 1. **Fork the repository** | ||
| - Click the "Fork" button at the top of the GitHub page to create your own copy. | ||
| 2. **Clone your fork** | ||
| - `git clone https://github.com/<your-username>/sguard.git` |
There was a problem hiding this comment.
Repository name case inconsistency: The clone URL uses lowercase "sguard" but the repository name is "SGuard" (capital S). The URL should be "https://github.com//SGuard.git" to match the actual repository name.
| - `git clone https://github.com/<your-username>/sguard.git` | |
| - `git clone https://github.com/<your-username>/SGuard.git` |
Add comprehensive documentation site in docs/ folder (21 pages)
Add GitHub Actions workflow for automatic deployment to gh-pages
Update README.md with documentation links
Remove broken coverage badge from README
Configure Docusaurus with SGuard branding and metadata
Add .gitignore entries for Docusaurus build artifacts
Documentation will be available at: https://selcukgural.github.io/SGuard/
Description
Please include a summary of the changes and the related issue.
Type of change
Checklist
dotnet buildlocally and it succeeded.dotnet testlocally and tests passed.Related links
Fixes # (if applicable)