Craft233 Server Official website
- Vue 3
- TypeScript
- Vite
- Vue Router
- Tailwind CSS
- Iconify
Most user-editable content is stored outside of components:
- src/content/siteContent.ts — site copy, navigation, footer links, page content, and SEO content sources
- src/config/site.config.json — site URL, base path, favicon source, theme color, and Minecraft status API settings
- src/config/routes.json — router path definitions plus no-index flags used by sitemap and robots generation
- src/config/theme.ts — accent palette values used by the site theme
- src/config/server.ts — Minecraft status API runtime config (reuses server address from
joinContent) - src/utils/seo.ts — runtime SEO metadata mapping
site.config.json also supports callback app mapping:
{
"callbackAppLinks": {
"rhythmlink": "https://github.com/neokoni/rhythmlink"
}
}- Keys are case-insensitive app names used by
/callback?app=.... - Keys are also used as the displayed app name when matched.
- When app name is mapped, callback page app label in the title will be rendered as an external link.
site.config.json also supports server map links:
{
"serverMapLinks": {
"main": "https://map.craft233.top/",
"oneblock": "https://map.craft233.top/oneblock/"
}
}- Keys are case-sensitive map IDs used by the map page.
- Values are the final map addresses opened in a new page.
- Map titles and descriptions are kept in src/content/siteContent.ts.
SEO blacklist rules are kept in src/config/routes.json and are used in two places:
- Runtime
robotsmeta tags for pages that should not be indexed. - Build-time robots and sitemap files are generated after
vite buildinto dist/, using the shared route config.
The current blacklist is stored in src/config/routes.json and includes the callback page and the 404 fallback page.
The favicon is downloaded during the build step from the configured remote URL and written into dist/.
The font is kept locally in public/fonts/InterVariable.woff2 and copied into dist/ by Vite.
Generated build artifacts are not committed to the repository.
When changing public-facing text, links, or branding, prefer updating these files instead of editing components directly.
npm install
npm run devnpm run buildnpm run previewThe status widget now uses an external HTTP API only.
Edit src/config/site.config.json:
{
"minecraftStatusApi": {
"url": "https://motd.minebbs.com/api/status",
"params": {
"ip": "$serverAddress",
"stype": "je",
"srv": "true"
},
"responsePaths": {
"online": "status",
"playersOnline": "players.online",
"playersMax": "players.max"
},
"onlineStringValue": "online"
}
}url: external API endpoint.params: query parameter map.ipcan use string reference"$serverAddress"(serverAddresscomes from src/config/server.ts, which reusesjoinContent.servers[0].addressfrom src/content/siteContent.ts).- API config is read only from src/config/site.config.json: no environment variable override, and no fallback defaults are injected in
server.ts. responsePaths: dot-path mapping for key fields (online,playersOnline,playersMax).onlineStringValue: whenonlinepath resolves to a string, it is compared with this value (case-insensitive).
Online value parsing behavior:
- Boolean: use directly (
true/false). - Number:
> 1=> online,< 1=> offline,= 1=> online. - String: first try
"true"/"false", otherwise compare withonlineStringValue.
If you are an AI coding assistant working on this project:
- Keep content and configuration in the dedicated files listed above.
- Avoid hardcoding site copy inside Vue components unless it is purely presentational.
- Make small, focused changes and keep layout/style adjustments minimal.
- Run a production build after edits to verify the site still compiles.
- Prefer updating existing configuration files before creating new ones.
- The application updates document metadata at runtime.
index.htmlonly keeps minimal fallback markup.- The server status widget is powered by a configurable external status API.