Overview
The article system provides:- Rich Text Editor: Create content with a TipTap-based WYSIWYG editor
- Dynamic Content: Use template variables that update automatically
- Access Control: Set read and write permissions per article
- Localization: Support for multiple language versions
- Version Control: Automatic versioning and migration of article formats
- Import/Export: Backup and transfer articles between instances
Article Structure
Articles are stored in thearticles/ directory as binary BSON files with the .gal extension (Guccho Article Localized).
File Organization
Localized Articles
Articles can have different versions for different languages. Create localized versions by adding subdirectories with language codes:Viewing Articles
Articles are displayed at/article/[slug] where slug is the article path.
Example: An article at articles/announcements/welcome.gal is accessible at:
Article Display Component
Articles are rendered using thecontent-render component:
src/pages/article/[...id].vue:43-50
The render component automatically:
- Processes dynamic templates
- Applies syntax highlighting to code blocks
- Handles localization
- Enforces access control
Creating and Editing Articles
Only Staff members and above can create and edit articles.Accessing the Editor
Navigate to/article/edit to access the article editor interface.
Editor Interface
The editor provides several key features:1. Article Selection
The left sidebar displays a tree view of all available articles. Click any article to load it for editing.2. Article Slug
Enter the article slug (path) in the text field:src/pages/article/edit.client.vue:228-238
3. Import/Export
Export: Download the article as a.article file for backup or transfer:
src/pages/article/edit.client.vue:67-80
Import: Load a previously exported .article file to restore or copy content.
4. Content Settings
Dynamic Content: Enable this checkbox to use template variables that update automatically based on server configuration. Read Access: Control who can view the article:public- Anyone can viewstaff- Staff members onlymoderator- Moderators and abovebeatmapNominator- Beatmap nominators and above
staff- Staff membersmoderator- ModeratorsbeatmapNominator- Beatmap nominators
src/pages/article/edit.client.vue:272-278
5. Rich Text Editor
The editor toolbar provides:- Text Formatting: Bold, italic, underline, strikethrough, code
- Headings: H1, H2, H3, H4, H5, H6
- Lists: Bullet lists, numbered lists, task lists
- Alignment: Left, center, right, justify
- Links: Insert hyperlinks
- Images: Upload or link images
- Code Blocks: Syntax-highlighted code blocks
- Tables: Create and edit tables
- Variables: Insert dynamic template variables
- Horizontal Rules: Add dividers
Saving Articles
Click the Save button to save changes. The system will:- Update the article metadata (last modified time and user)
- If not dynamic, pre-render the HTML for faster loading
- Save the BSON-serialized content to disk
- Update related localized versions with the same content structure
src/pages/article/edit.client.vue:122-133
Deleting Articles
Click the Delete button to permanently remove an article. A confirmation dialog will appear. Note: Fallback articles (403, 404, etc.) cannot be deleted to ensure system stability.Dynamic Content and Templates
Dynamic articles can include template variables that automatically update based on server configuration.Enabling Dynamic Content
Check the “Dynamic Content” checkbox in the editor. Dynamic articles:- Render variables at request time instead of save time
- Display current server information
- Automatically reflect configuration changes
Using Variables
- Type
{{in the editor to see available variables - Select a variable from the dropdown
- Optionally set a custom fallback value by clicking the variable chip
Available Variables
Server Information:domain- Server domain nameserver.name- Server title/name
mode.osu- osu!standard display namemode.taiko- Taiko display namemode.fruits- Catch display namemode.mania- Mania display name
ruleset.standard- Standard ruleset nameruleset.relax- Relax ruleset nameruleset.autopilot- Autopilot ruleset name
rank.ppv1- PPv1 ranking system namerank.ppv2- PPv2 ranking system namerank.rankedScore- Ranked score system namerank.totalScore- Total score system name
Variable Fallbacks
Variables display with a yellowish tint when only using default fallbacks. You can set custom fallbacks by:- Clicking the variable chip
- Entering your fallback text
- Clicking Save
Access Control
Articles include built-in access control for both reading and editing.Permission Levels
Read Access:public(Scope.Public) - Available to all visitors- Role-based:
staff,moderator,beatmapNominator
- Role-based only:
staff,moderator,beatmapNominator - Article owners always have write access
- Admins and owners can edit any article
Access Check
src/server/backend/$base/server/article/index.ts:278-289
Edit Button Visibility
The edit button only appears if the user has write access:src/pages/article/[...id].vue:46-48
Article Metadata
Each article stores metadata including:Technical Details
Storage Format
Articles are stored as BSON (Binary JSON) for efficient serialization:src/server/backend/$base/server/article/index.ts:110-116
Content Structure
Version Migration
The article system includes automatic version migration. When loading older articles, the system:- Detects the article version
- Applies migration pipeline if needed
- Logs the migration path
- Returns the updated content
src/server/backend/$base/server/article/index.ts:118-144
Configuration
Configure the article storage location in your environment:src/server/backend/$base/env.ts:14-15
Best Practices
- Use Dynamic Content for Server Info: Enable dynamic content for pages that reference server settings
- Set Custom Fallbacks: Provide custom fallbacks for important variables to ensure stability
- Export Before Major Changes: Export articles before making significant edits
- Use Appropriate Access Levels: Set read access to
publicfor announcements, restrict sensitive content - Organize with Folders: Use subdirectories to organize articles by category
- Provide Multiple Languages: Create localized versions for international communities
- Test Dynamic Variables: Preview dynamic articles in different languages and configurations