diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index a7baf6a5..b704d6a4 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -2,12 +2,14 @@ import process from 'node:process' import { viteBundler } from '@vuepress/bundler-vite' import { webpackBundler } from '@vuepress/bundler-webpack' import { defineUserConfig } from '@vuepress/cli' -// import { docsearchPlugin } from '@vuepress/plugin-docsearch' import { shikiPlugin } from '@vuepress/plugin-shiki' import { defaultTheme } from '@vuepress/theme-default' import { getDirname, path } from '@vuepress/utils' +import { backToTopPlugin } from "@vuepress/plugin-back-to-top" +import { externalLinkIconPlugin } from "@vuepress/plugin-external-link-icon" +import { nprogressPlugin } from "@vuepress/plugin-nprogress" -import { head } from './configs/head.js' +import { headConfig } from './configs/head.js' import { mainConfig, defaultThemeConfig } from './configs/locales_config.js' const __dirname = getDirname(import.meta.url) @@ -18,7 +20,7 @@ export default defineUserConfig({ base: '/', // extra tags in `` - head: head, + head: headConfig, // site-level locales config locales: mainConfig, @@ -29,7 +31,7 @@ export default defineUserConfig({ // configure default theme theme: defaultTheme({ logo: "/images/MCC_logo.png", - repo: "https://github.com/MCCTeam/Minecraft-Console-Client", + repo: "MCCTeam/Minecraft-Console-Client", docsDir: 'docs', // theme-level locales config @@ -53,6 +55,9 @@ export default defineUserConfig({ // use plugins plugins: [ + backToTopPlugin(), + externalLinkIconPlugin(), + nprogressPlugin(), // only enable shiki plugin in production mode isProd ? shikiPlugin({ theme: 'dark-plus' }) : [], ], diff --git a/docs/.vuepress/configs/head.ts b/docs/.vuepress/configs/head.ts index a43adb88..b3486cdb 100644 --- a/docs/.vuepress/configs/head.ts +++ b/docs/.vuepress/configs/head.ts @@ -1,8 +1,32 @@ import type { HeadConfig } from '@vuepress/core' -export const head: HeadConfig[] = [ - ["meta", { name: "theme-color", content: "#3eaf7c" }], - ["meta", { name: "apple-mobile-web-app-capable", content: "yes" }], - ["meta", { name: "apple-mobile-web-app-status-bar-style", content: "black" }], - ["link", { rel: "icon", href: "../../favicon.ico" }], +export const headConfig: HeadConfig[] = [ + [ + 'link', + { + rel: 'icon', + type: 'image/png', + sizes: '16x16', + href: `/images/icons/favicon-16x16.png`, + }, + ], + [ + 'link', + { + rel: 'icon', + type: 'image/png', + sizes: '32x32', + href: `/images/icons/favicon-32x32.png`, + }, + ], + ['link', { rel: 'manifest', href: '/manifest.webmanifest' }], + ['meta', { name: 'application-name', content: 'MCC Doc' }], + ['meta', { name: 'apple-mobile-web-app-title', content: 'MCC Doc' }], + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], + [ + 'link', + { rel: 'apple-touch-icon', href: `/images/icons/apple-touch-icon.png` }, + ], + ['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }], + ['meta', { name: 'theme-color', content: '#3eaf7c' }], ] diff --git a/docs/.vuepress/configs/l10n_configs/config_templete.ts b/docs/.vuepress/configs/l10n_configs/config_templete.ts index c89a4fc9..cf755c90 100644 --- a/docs/.vuepress/configs/l10n_configs/config_templete.ts +++ b/docs/.vuepress/configs/l10n_configs/config_templete.ts @@ -1,14 +1,14 @@ import type { SiteLocaleData } from '@vuepress/shared' import type { DefaultThemeLocaleData } from '@vuepress/theme-default' -import { head } from '../head.js' +import { headConfig } from '../head.js' const Translation = require('../../translations/$LanguageCode$.json') -export const mainConfig_$LanguageCodeEscaped$: SiteLocaleData = { +export const mainConfig_$LanguageCodeEscaped$ = { lang: '$LanguageCode$', title: Translation.title, description: Translation.description, - head: head + head: headConfig } export const defaultThemeConfig_$LanguageCodeEscaped$: DefaultThemeLocaleData = { diff --git a/docs/.vuepress/configs/l10n_configs/en.ts b/docs/.vuepress/configs/l10n_configs/en.ts index 49e3f762..fe1d5e69 100644 --- a/docs/.vuepress/configs/l10n_configs/en.ts +++ b/docs/.vuepress/configs/l10n_configs/en.ts @@ -1,15 +1,15 @@ /* This file is automatically generated by "gen_configs.py" */ import type { SiteLocaleData } from '@vuepress/shared' import type { DefaultThemeLocaleData } from '@vuepress/theme-default' -import { head } from '../head.js' +import { headConfig } from '../head.js' const Translation = require('../../translations/en.json') -export const mainConfig_en: SiteLocaleData = { +export const mainConfig_en = { lang: 'en', title: Translation.title, description: Translation.description, - head: head + head: headConfig } export const defaultThemeConfig_en: DefaultThemeLocaleData = { diff --git a/docs/.vuepress/configs/l10n_configs/zh-Hans.ts b/docs/.vuepress/configs/l10n_configs/zh-Hans.ts index 0572c74e..1a468ead 100644 --- a/docs/.vuepress/configs/l10n_configs/zh-Hans.ts +++ b/docs/.vuepress/configs/l10n_configs/zh-Hans.ts @@ -1,15 +1,15 @@ /* This file is automatically generated by "gen_configs.py" */ import type { SiteLocaleData } from '@vuepress/shared' import type { DefaultThemeLocaleData } from '@vuepress/theme-default' -import { head } from '../head.js' +import { headConfig } from '../head.js' const Translation = require('../../translations/zh-Hans.json') -export const mainConfig_zh_Hans: SiteLocaleData = { +export const mainConfig_zh_Hans = { lang: 'zh-Hans', title: Translation.title, description: Translation.description, - head: head + head: headConfig } export const defaultThemeConfig_zh_Hans: DefaultThemeLocaleData = { diff --git a/docs/.vuepress/public/icons/android-chrome-192x192.png b/docs/.vuepress/public/icons/android-chrome-192x192.png new file mode 100644 index 00000000..aa03e2de Binary files /dev/null and b/docs/.vuepress/public/icons/android-chrome-192x192.png differ diff --git a/docs/.vuepress/public/icons/android-chrome-512x512.png b/docs/.vuepress/public/icons/android-chrome-512x512.png new file mode 100644 index 00000000..e70398d0 Binary files /dev/null and b/docs/.vuepress/public/icons/android-chrome-512x512.png differ diff --git a/docs/.vuepress/public/icons/apple-touch-icon.png b/docs/.vuepress/public/icons/apple-touch-icon.png new file mode 100644 index 00000000..d62b253c Binary files /dev/null and b/docs/.vuepress/public/icons/apple-touch-icon.png differ diff --git a/docs/.vuepress/public/icons/favicon-16x16.png b/docs/.vuepress/public/icons/favicon-16x16.png new file mode 100644 index 00000000..599aca88 Binary files /dev/null and b/docs/.vuepress/public/icons/favicon-16x16.png differ diff --git a/docs/.vuepress/public/icons/favicon-32x32.png b/docs/.vuepress/public/icons/favicon-32x32.png new file mode 100644 index 00000000..d6b505eb Binary files /dev/null and b/docs/.vuepress/public/icons/favicon-32x32.png differ diff --git a/docs/.vuepress/public/icons/favicon.ico b/docs/.vuepress/public/icons/favicon.ico new file mode 100644 index 00000000..f18867ae Binary files /dev/null and b/docs/.vuepress/public/icons/favicon.ico differ diff --git a/docs/.vuepress/public/images/guide/ChunkStatus.png b/docs/.vuepress/public/images/guide/ChunkStatus.png new file mode 100644 index 00000000..2d6c0fa7 Binary files /dev/null and b/docs/.vuepress/public/images/guide/ChunkStatus.png differ diff --git a/docs/.vuepress/public/images/guide/PlayerInventory.png b/docs/.vuepress/public/images/guide/PlayerInventory.png new file mode 100644 index 00000000..b795e968 Binary files /dev/null and b/docs/.vuepress/public/images/guide/PlayerInventory.png differ diff --git a/docs/.vuepress/public/images/guide/VPS_ConfigureStorage.png b/docs/.vuepress/public/images/guide/VPS_ConfigureStorage.png new file mode 100644 index 00000000..c947e72d Binary files /dev/null and b/docs/.vuepress/public/images/guide/VPS_ConfigureStorage.png differ diff --git a/docs/.vuepress/public/images/guide/VPS_InstanceType.png b/docs/.vuepress/public/images/guide/VPS_InstanceType.png new file mode 100644 index 00000000..2875ce8f Binary files /dev/null and b/docs/.vuepress/public/images/guide/VPS_InstanceType.png differ diff --git a/docs/.vuepress/public/images/guide/VPS_Name.png b/docs/.vuepress/public/images/guide/VPS_Name.png new file mode 100644 index 00000000..41777c3a Binary files /dev/null and b/docs/.vuepress/public/images/guide/VPS_Name.png differ diff --git a/docs/.vuepress/public/images/guide/VPS_NetworkSettings.png b/docs/.vuepress/public/images/guide/VPS_NetworkSettings.png new file mode 100644 index 00000000..58c64dfd Binary files /dev/null and b/docs/.vuepress/public/images/guide/VPS_NetworkSettings.png differ diff --git a/docs/.vuepress/public/images/guide/VPS_SelectOS.png b/docs/.vuepress/public/images/guide/VPS_SelectOS.png new file mode 100644 index 00000000..4eca51ef Binary files /dev/null and b/docs/.vuepress/public/images/guide/VPS_SelectOS.png differ diff --git a/docs/.vuepress/public/manifest.webmanifest b/docs/.vuepress/public/manifest.webmanifest new file mode 100644 index 00000000..5e3a24fb --- /dev/null +++ b/docs/.vuepress/public/manifest.webmanifest @@ -0,0 +1,20 @@ +{ + "name": "MCC Documentation", + "short_name": "MCC Doc", + "description": "Documentation website for Minecraft Console Client (MCC)", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#3eaf7c", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index 5f6a03b5..31f0e42d 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -346,7 +346,7 @@ Coordinate = { x = 145, y = 64, y = 2045 } How it looks like: - ![ASCII Art here](http://i.pics.rs/33yn9.png "ASCII Art here") + ![ASCII Art here](/images/guide/PlayerInventory.png "ASCII Art here") - **Type:** `boolean` diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 3e244683..f8a351ab 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -540,13 +540,13 @@ Click on the **Launch instance** button. Fill out the `Name` field with a name of your preference. -![http://i.pics.rs/22ArI.png](http://i.pics.rs/WWzUM.png) +![VPS Name](/images/guide/VPS_Name.png) For the **Application and OS images** select `Ubuntu Server 22.04 LTS (HVM), SSD Volume Type`. > **⚠️ VERY IMPORTANT: Make sure that it has `Free tier eligible` next to it.** -![http://i.pics.rs/22ArI.png](http://i.pics.rs/22ArI.png) +![VPS Select OS](/images/guide/VPS_SelectOS.png) For the **Instance type** select `t2.micro`. @@ -554,7 +554,7 @@ For the **Key pair (login)** click on **Create new key pair** and name it `VpsRo > **⚠️ EXTREMELY IMPORTANT: Make sure that you save this file in a safe place and do not loose it, it's of an upmost importance since it's used to access the root/admin account of the VPS. Without it you will not be able to access the root account of the VPS! Also do not let it fall into wrong hands.** -![http://i.pics.rs/jjD4d.png](http://i.pics.rs/jjD4d.png) +![VPS Instance Type](/images/guide/VPS_InstanceType.png) For the **Network settings** check the following checkboxes on: @@ -564,11 +564,11 @@ For the **Network settings** check the following checkboxes on: > **ℹ️ NOTE: The SSH traffic from Anywhere is not the best thing for security, you might want to enter IP addresses of your devices from which you want to access the VPS manually.** -![http://i.pics.rs/77atQ.png](http://i.pics.rs/77atQ.png) +![VPS Network Settings](/images/guide/VPS_NetworkSettings.png) For the **Storage** enter `30`. -![http://i.pics.rs/cc4yz.png](http://i.pics.rs/cc4yz.png) +![VPS Configure Storage](/images/guide/VPS_ConfigureStorage.png) Finally, review the **Summary** confirm that everything is as in the tutorial and that you will not be charged and click on the **Launch instance**. Once you've clicked on the button, it will take a couple of minutes for the instance to be available up and running. diff --git a/docs/guide/usage.md b/docs/guide/usage.md index b7054a1f..9d553b28 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -278,7 +278,7 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q How it looks: - ![Chunk status](http://i.pics.rs/DDB9W.png) + ![Chunk status](/images/guide/ChunkStatus.png) ### `dig` @@ -768,7 +768,7 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q An example of player inventory with annotated IDs in ASCII art and a list of items: - ![Picture Not Loaded!](http://i.pics.rs/33yn9.png "Player Inventory") + ![Player Inventory](/images/guide/PlayerInventory.png "Player Inventory") - **Usage:** diff --git a/docs/zh-Hans/guide/configuration.md b/docs/zh-Hans/guide/configuration.md index 5f6a03b5..31f0e42d 100644 --- a/docs/zh-Hans/guide/configuration.md +++ b/docs/zh-Hans/guide/configuration.md @@ -346,7 +346,7 @@ Coordinate = { x = 145, y = 64, y = 2045 } How it looks like: - ![ASCII Art here](http://i.pics.rs/33yn9.png "ASCII Art here") + ![ASCII Art here](/images/guide/PlayerInventory.png "ASCII Art here") - **Type:** `boolean` diff --git a/docs/zh-Hans/guide/installation.md b/docs/zh-Hans/guide/installation.md index 3e244683..f8a351ab 100644 --- a/docs/zh-Hans/guide/installation.md +++ b/docs/zh-Hans/guide/installation.md @@ -540,13 +540,13 @@ Click on the **Launch instance** button. Fill out the `Name` field with a name of your preference. -![http://i.pics.rs/22ArI.png](http://i.pics.rs/WWzUM.png) +![VPS Name](/images/guide/VPS_Name.png) For the **Application and OS images** select `Ubuntu Server 22.04 LTS (HVM), SSD Volume Type`. > **⚠️ VERY IMPORTANT: Make sure that it has `Free tier eligible` next to it.** -![http://i.pics.rs/22ArI.png](http://i.pics.rs/22ArI.png) +![VPS Select OS](/images/guide/VPS_SelectOS.png) For the **Instance type** select `t2.micro`. @@ -554,7 +554,7 @@ For the **Key pair (login)** click on **Create new key pair** and name it `VpsRo > **⚠️ EXTREMELY IMPORTANT: Make sure that you save this file in a safe place and do not loose it, it's of an upmost importance since it's used to access the root/admin account of the VPS. Without it you will not be able to access the root account of the VPS! Also do not let it fall into wrong hands.** -![http://i.pics.rs/jjD4d.png](http://i.pics.rs/jjD4d.png) +![VPS Instance Type](/images/guide/VPS_InstanceType.png) For the **Network settings** check the following checkboxes on: @@ -564,11 +564,11 @@ For the **Network settings** check the following checkboxes on: > **ℹ️ NOTE: The SSH traffic from Anywhere is not the best thing for security, you might want to enter IP addresses of your devices from which you want to access the VPS manually.** -![http://i.pics.rs/77atQ.png](http://i.pics.rs/77atQ.png) +![VPS Network Settings](/images/guide/VPS_NetworkSettings.png) For the **Storage** enter `30`. -![http://i.pics.rs/cc4yz.png](http://i.pics.rs/cc4yz.png) +![VPS Configure Storage](/images/guide/VPS_ConfigureStorage.png) Finally, review the **Summary** confirm that everything is as in the tutorial and that you will not be charged and click on the **Launch instance**. Once you've clicked on the button, it will take a couple of minutes for the instance to be available up and running. diff --git a/docs/zh-Hans/guide/usage.md b/docs/zh-Hans/guide/usage.md index 2ee15fdf..9d553b28 100644 --- a/docs/zh-Hans/guide/usage.md +++ b/docs/zh-Hans/guide/usage.md @@ -46,7 +46,7 @@ _Learn more on how to use the screen command: [YouTube](https://www.youtube.com/ ## Docker -See [Run using Docker](./installation.md#using-docker) +See [Run using Docker](./guide/installation.md#using-docker) ## Command-line usage @@ -278,7 +278,7 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q How it looks: - ![Chunk status](http://i.pics.rs/DDB9W.png) + ![Chunk status](/images/guide/ChunkStatus.png) ### `dig` @@ -768,7 +768,7 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q An example of player inventory with annotated IDs in ASCII art and a list of items: - ![Picture Not Loaded!](http://i.pics.rs/33yn9.png "Player Inventory") + ![Player Inventory](/images/guide/PlayerInventory.png "Player Inventory") - **Usage:**