Skip to content

docs: Add comprehensive documentation system with mdBook#9

Merged
Bli-AIk merged 18 commits into
mainfrom
doc
Nov 19, 2025
Merged

docs: Add comprehensive documentation system with mdBook#9
Bli-AIk merged 18 commits into
mainfrom
doc

Conversation

@Bli-AIk

@Bli-AIk Bli-AIk commented Nov 10, 2025

Copy link
Copy Markdown
Owner

PR Type

Please check the type of this PR (you can select multiple)

  • 🐞 Bug fix
  • ✨ New feature
  • 📚 Documentation change
  • 🎨 Code style change (such as formatting, renaming)
  • ♻️ Refactoring
  • ⚡️ Performance improvement
  • 🧪 Adding or updating tests
  • 🤖 CI/CD (Changes to CI/CD configuration)
  • 📦 Other changes

Related Issue

N/A - This is a new documentation system implementation

What does this PR do?

This PR introduces a comprehensive documentation system for the Mortar language using mdBook:

  • 📚 Complete mdBook Documentation Structure: Added English and Chinese documentation with proper organization and navigation
  • 🎨 Catppuccin Theme Integration: Implemented the beautiful Catppuccin theme with all four color variants (Latte, Frappé, Macchiato, Mocha)
  • 🌐 Dual-Language Support: Full support for English (/en/) and Chinese (/zh-Hans/) with intelligent language detection and redirection
  • 🤖 GitHub Actions Workflow: Automated documentation building and deployment to GitHub Pages
  • 📁 Organized File Structure: Renamed all markdown files with numbered prefixes for better organization and maintenance
  • 🛠️ Build Scripts: Added convenient scripts (serve-en.sh, serve-zh.sh, build-docs.sh) for local development
  • 🗂️ Git Configuration: Added proper .gitignore for mdBook artifacts and temporary files

How to test?

Local Testing

  1. Build Documentation Locally:

    ./build-docs.sh
  2. Preview English Documentation:

    ./serve-en.sh
    # Opens http://localhost:3000 with English docs
  3. Preview Chinese Documentation:

    ./serve-zh.sh  
    # Opens http://localhost:3001 with Chinese docs
  4. Verify Theme Functionality:

    • Test all four Catppuccin themes (Latte, Frappé, Macchiato, Mocha) using the theme switcher
    • Verify that both light and dark mode defaults work correctly
    • Confirm that the theme persists across page navigation

GitHub Actions Testing

  1. Check Workflow Status: The GitHub Actions workflow should complete successfully ✅
  2. Verify Deployment: Once merged to main, documentation will be available at:
    • English: https://bli-aik.github.io/mortar/en/
    • Chinese: https://bli-aik.github.io/mortar/zh-Hans/
    • Root redirect: https://bli-aik.github.io/mortar/ (auto-detects language)

Screenshots or Videos

N/A

Additional Information

Technical Implementation Details

N/A

This commit introduces a complete documentation system for the project using mdBook. Includes English and Chinese translations, custom Catppuccin theme, build scripts, and GitHub Actions workflow for automated deployment.
@Bli-AIk Bli-AIk self-assigned this Nov 10, 2025
@Bli-AIk Bli-AIk added the documentation Improvements or additions to documentation label Nov 10, 2025
- Add flexible path detection for book output directories
- Check both book/ and docs/book/ locations
- Add error handling for missing build outputs
- Improve debugging with directory listing
@Bli-AIk Bli-AIk marked this pull request as draft November 17, 2025 06:34
Refactor Chinese documentation to enforce consistent naming conventions:
- Node names use PascalCase (e.g., OpeningScene, StartScene)
- Function names use snake_case (e.g., play_sound, get_player_name)
- Update all examples and code snippets across documentation files
- Add naming convention guidelines and best practices
@Bli-AIk Bli-AIk marked this pull request as ready for review November 19, 2025 04:59
@Bli-AIk Bli-AIk merged commit 37c730f into main Nov 19, 2025
11 checks passed
@Bli-AIk Bli-AIk deleted the doc branch November 19, 2025 05:33
@Bli-AIk Bli-AIk mentioned this pull request Apr 18, 2026
@Bli-AIk Bli-AIk mentioned this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant