Skip to content

Commit

Permalink
🎨 Format docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mobyw committed May 26, 2024
1 parent 424988a commit 85851a4
Show file tree
Hide file tree
Showing 35 changed files with 98 additions and 385 deletions.
22 changes: 2 additions & 20 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineUserConfig } from "vuepress";
import { redirectPlugin } from "vuepress-plugin-redirect";
import { searchProPlugin } from "vuepress-plugin-search-pro";
import { viteBundler } from "@vuepress/bundler-vite";
import theme from "./theme.js";

export default defineUserConfig({
Expand All @@ -21,24 +20,7 @@ export default defineUserConfig({

theme,

plugins: [
redirectPlugin({
autoLocale: true,
switchLocale: "modal",
}),
searchProPlugin({
indexContent: true,
locales: {
"/zh/": {
placeholder: "搜索",
},

"/en/": {
placeholder: "Search",
},
},
}),
],
bundler: viteBundler(),

// Enable it with pwa
// shouldPrefetch: false,
Expand Down
25 changes: 1 addition & 24 deletions docs/.vuepress/navbar/en.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
import { navbar } from "vuepress-theme-hope";

export const enNavbar = navbar([
"/en/",
{ text: "Install", icon: "install", link: "/en/install/" },
{
text: "Guide",
icon: "read",
prefix: "/en/guide/",
children: [
{
text: "Bar",
icon: "creative",
prefix: "bar/",
children: ["baz", { text: "...", icon: "more", link: "" }],
},
{
text: "Foo",
icon: "config",
prefix: "foo/",
children: ["ray", { text: "...", icon: "more", link: "" }],
},
],
},
{ text: "Resource", icon: "pic", link: "/en/resource/" },
]);
export const enNavbar = navbar(["/en/", { text: "Resource", icon: "ph:package", link: "/en/resource/" }]);
25 changes: 1 addition & 24 deletions docs/.vuepress/navbar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
import { navbar } from "vuepress-theme-hope";

export const zhNavbar = navbar([
"/zh/",
{ text: "安装", icon: "insatll", link: "/zh/install/" },
{
text: "指南",
icon: "read",
prefix: "/zh/guide/",
children: [
{
text: "Bar",
icon: "creative",
prefix: "bar/",
children: ["baz", { text: "...", icon: "more", link: "" }],
},
{
text: "Foo",
icon: "config",
prefix: "foo/",
children: ["ray", { text: "...", icon: "more", link: "" }],
},
],
},
{ text: "资源", icon: "pic", link: "/zh/resource/" },
]);
export const zhNavbar = navbar(["/zh/", { text: "资源", icon: "ph:package", link: "/zh/resource/" }]);
Binary file modified docs/.vuepress/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 1 addition & 13 deletions docs/.vuepress/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,9 @@ import { sidebar } from "vuepress-theme-hope";
export const enSidebar = sidebar({
"/en/": [
"",
{
text: "Install",
icon: "install",
prefix: "install/",
children: "structure",
},
{
text: "Guide",
icon: "read",
prefix: "guide/",
children: "structure",
},
{
text: "Resource",
icon: "pic",
icon: "ph:package",
prefix: "resource/",
children: "structure",
},
Expand Down
14 changes: 1 addition & 13 deletions docs/.vuepress/sidebar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,9 @@ import { sidebar } from "vuepress-theme-hope";
export const zhSidebar = sidebar({
"/zh/": [
"",
{
text: "安装",
icon: "install",
prefix: "install/",
children: "structure",
},
{
text: "指南",
icon: "read",
prefix: "guide/",
children: "structure",
},
{
text: "资源",
icon: "pic",
icon: "ph:package",
prefix: "resource/",
children: "structure",
},
Expand Down
50 changes: 28 additions & 22 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default hopeTheme({
name: "Mar-7th",
url: "https://github.com/Mar-7th",
},
iconAssets: "iconfont",
iconAssets: "iconify",
logo: "/logo.png",
repo: "Mar-7th/March7th-Docs",
docsBranch: 'master',
docsBranch: "master",
docsDir: "docs",

locales: {
Expand Down Expand Up @@ -45,15 +45,14 @@ export default hopeTheme({
editLink: "Edit this page on GitHub",
},
},

},

// encrypt: {
// config: {
// "/zh/demo/encrypt.html": ["1234"],
// "/en/demo/encrypt.html": ["1234"],
// },
// },
// encrypt: {
// config: {
// "/zh/demo/encrypt.html": ["1234"],
// "/en/demo/encrypt.html": ["1234"],
// },
// },

plugins: {
// comment: {
Expand All @@ -65,25 +64,15 @@ export default hopeTheme({
mdEnhance: {
align: true,
attrs: true,
chart: true,
codetabs: true,
component: true,
demo: true,
echarts: true,
figure: true,
flowchart: true,
gfm: true,
imgLazyload: true,
imgSize: true,
include: true,
katex: true,
mark: true,
mermaid: true,
playground: {
presets: ["ts", "vue"],
},
presentation: {
plugins: ["highlight", "math", "search", "notes", "zoom"],
},
spoiler: true,
stylize: [
{
matcher: "Recommended",
Expand All @@ -100,8 +89,25 @@ export default hopeTheme({
sub: true,
sup: true,
tabs: true,
tasklist: true,
vPre: true,
vuePlayground: true,
},

search: {
locales: {
"/zh/": {
placeholder: "搜索",
},

"/en/": {
placeholder: "Search",
},
},
},

redirect: {
autoLocale: true,
switchLocale: "modal",
},

// uncomment these if you want a pwa
Expand Down
46 changes: 18 additions & 28 deletions docs/en/README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,33 @@
---
home: true
icon: home
icon: ph:star
title: Home
heroImage: /logo.png
heroText: March7th
tagline: Honkai Star Rail bot based on Nonebot2.
tagline: Honkai Star Rail tools.
actions:
- text: Install 💡
link: /en/install/
- text: Resource 💡
link: /en/resource/
type: primary

- text: Docs
link: /en/guide/
- text: GitHub
link: https://github.com/Mar-7th

features:
- title: HelpMenu
icon: markdown
details: Draw StarRail help menu
link: #
- title: MiHoMo API
icon: ph:link-simple-horizontal
details: Public account data API
link: /en/resource/mihomo_api.html

- title: AccountBind
icon: link
details: Bind StarRail UID
link: #
- title: StarRailRes
icon: ph:images-square
details: Game data and image resources
link: /en/resource/

- title: AccountInfo
icon: profile
details: Draw info of account
link: #

- title: GameMemo
icon: diagram
details: Memo & month statistics
link: #

- title: GameWiki
icon: info
details: Wiki of characters, etc.
link: #
- title: StarRailScore
icon: ph:scales
details: Relic scoring criteria
link: https://github.com/Mar-7th/StarRailScore

copyright: false
footer: MIT Licensed | © 2023-present Mar-7th
Expand Down
19 changes: 0 additions & 19 deletions docs/en/guide/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/en/guide/bar/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/en/guide/bar/baz.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/en/guide/foo/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/en/guide/foo/ray.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/en/install/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions docs/en/install/environment.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/en/resource/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Resource
icon: pic
icon: ph:package
index: false
category:
- Resource
Expand Down
Loading

0 comments on commit 85851a4

Please sign in to comment.