diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 68f557cd..9d938181 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -19,72 +19,47 @@ export default defineConfig({ '/': { label: '简体中文', nav: [ - { text: '使用指南', link: '/', activeMatch: '^/$|^/guide/' }, + { text: '使用指南', + link: '/', + activeMatch: '^/$|^/guide/' + }, { text: '开发手册', - link: '/config/basics', - activeMatch: '^/config/' + link: '/developer/basics', + activeMatch: '^/developer/' } ], - + sidebar: { '/guide/': getGuideSidebarZhCN(), - '/config/': getConfigSidebarZhCN(), + '/developer/': getDeveloperSidebarZhCN(), '/': getGuideSidebarZhCN() }, repo: 'nezhahq/nezhahq.github.io', docsDir: 'docs', docsBranch: 'main', editLinks: true, - editLinkText: 'Edit this page on GitHub', - lastUpdated: 'Last Updated', - - algolia: { - appId: '8J64VVRP8K', - apiKey: 'a18e2f4cc5665f6602c5631fd868adfd', - indexName: 'vitepress' - }, - - carbonAds: { - carbon: 'CEBDT27Y', - custom: 'CKYD62QM', - placement: 'vuejsorg' - } + editLinkText: '在GitHub中编辑', + lastUpdated: '上次更新' }, '/en_US/': { label: 'English', nav: [ - { text: 'User Guide', link: '/en_US/', activeMatch: '^/$|^/guide/' }, - { - text: 'Development Manual', - link: '/en_US/config/basics', - activeMatch: '^/config/' - } + { text: 'User Guide', link: '/en_US/', activeMatch: '^/$|^/en_US/guide/' }, + { text: 'Development Manual', link: '/en_US/developer/basics', activeMatch: '^/en_US/developer/' } ], sidebar: { - '/guide/': getGuideSidebarEnUS(), - '/config/': getConfigSidebarEnUS(), - '/': getGuideSidebarEnUS() + '/en_US/guide/': getGuideSidebarEnUS(), + '/en_US/developer/': getDeveloperSidebarEnUS(), + '/en_US/': getGuideSidebarEnUS() }, repo: 'nezhahq/nezhahq.github.io', docsDir: 'docs', docsBranch: 'main', editLinks: true, editLinkText: 'Edit this page on GitHub', - lastUpdated: 'Last Updated', - - algolia: { - appId: '8J64VVRP8K', - apiKey: 'a18e2f4cc5665f6602c5631fd868adfd', - indexName: 'vitepress' - }, - - carbonAds: { - carbon: 'CEBDT27Y', - custom: 'CKYD62QM', - placement: 'vuejsorg' - } + lastUpdated: 'Last Updated' } } } @@ -108,38 +83,38 @@ function getGuideSidebarZhCN() { { text: '管理面板配置', children: [ - { text: '主机', link: '/guide/frontmatter' }, - { text: '服务', link: '/guide/theming' }, - { text: '定时任务', link: '/guide/api' }, - { text: '报警通知', link: '/guide/api' }, - { text: '设置', link: '/guide/differences-from-vuepress' } + { text: '主机', link: '/guide/servers' }, + { text: '服务', link: '/guide/services' }, + { text: '定时任务', link: '/guide/tasks' }, + { text: '报警通知', link: '/guide/notifications' }, + { text: '设置', link: '/guide/settings' } ] }, { text: '常见问题', children: [ - { text: '问题1', link: '/guide/frontmatter' }, - { text: '问题2', link: '/guide/theming' }, - { text: '问题3', link: '/guide/api' }, - { text: '问题4', link: '/guide/api' }, - { text: '问题5', link: '/guide/differences-from-vuepress' } + { text: '问题1', link: '/guide/q1' }, + { text: '问题2', link: '/guide/q2' }, + { text: '问题3', link: '/guide/q3' }, + { text: '问题4', link: '/guide/q4' }, + { text: '问题5', link: '/guide/q5' } ] } ] } -function getConfigSidebarZhCN() { +function getDeveloperSidebarZhCN() { return [ { text: 'App Config', - children: [{ text: 'Basics', link: '/config/basics' }] + children: [ { text: 'Basics', link: '/developer/basics' } ] }, { text: 'Theme Config', children: [ - { text: 'Homepage', link: '/config/homepage' }, - { text: 'Algolia Search', link: '/config/algolia-search' }, - { text: 'Carbon Ads', link: '/config/carbon-ads' } + { text: 'Homepage', link: '/developer/homepage' }, + { text: 'Algolia Search', link: '/developer/algolia-search' }, + { text: 'Carbon Ads', link: '/developer/carbon-ads' } ] } ] @@ -154,47 +129,47 @@ function getGuideSidebarEnUS() { ] }, { - text: 'Installation', + text: 'Installation Manual', children: [ { text: 'Install Dashboard', link: '/en_US/guide/dashboard' }, { text: 'Install Agent', link: '/en_US/guide/agent' } ] }, { - text: 'Advanced Configuration', + text: 'Admin Panel', children: [ - { text: 'Servers', link: '/guide/frontmatter' }, - { text: 'Services', link: '/guide/theming' }, - { text: 'Tasks', link: '/guide/api' }, - { text: 'Notifications', link: '/guide/api' }, - { text: 'Settings', link: '/guide/differences-from-vuepress' } + { text: 'Servers', link: '/en_US/guide/servers' }, + { text: 'Services', link: '/en_US/guide/services' }, + { text: 'Tasks', link: '/en_US/guide/tasks' }, + { text: 'Notifications', link: '/en_US/guide/notifications' }, + { text: 'Settings', link: '/en_US/guide/settings' } ] }, { text: 'FAQ', children: [ - { text: '问题1', link: '/guide/frontmatter' }, - { text: '问题2', link: '/guide/theming' }, - { text: '问题3', link: '/guide/api' }, - { text: '问题4', link: '/guide/api' }, - { text: '问题5', link: '/guide/differences-from-vuepress' } + { text: 'Q1', link: '/en_US/guide/q1' }, + { text: 'Q2', link: '/en_US/guide/q2' }, + { text: 'Q3', link: '/en_US/guide/q3' }, + { text: 'Q4', link: '/en_US/guide/q4' }, + { text: 'Q5', link: '/en_US/guide/q5' } ] } ] } -function getConfigSidebarEnUS() { +function getDeveloperSidebarEnUS() { return [ { text: 'App Config', - children: [{ text: 'Basics', link: '/en_US/config/basics' }] + children: [ { text: 'Basics', link: '/en_US/developer/basics' } ] }, { text: 'Theme Config', children: [ - { text: 'Homepage', link: '/en_US/config/homepage' }, - { text: 'Algolia Search', link: '/en_US/config/algolia-search' }, - { text: 'Carbon Ads', link: '/en_US/config/carbon-ads' } + { text: 'Homepage', link: '/en_US/developer/homepage' }, + { text: 'Algolia Search', link: '/en_US/developer/algolia-search' }, + { text: 'Carbon Ads', link: '/en_US/developer/carbon-ads' } ] } ] diff --git a/docs/config/algolia-search.md b/docs/developer/algolia-search.md similarity index 100% rename from docs/config/algolia-search.md rename to docs/developer/algolia-search.md diff --git a/docs/config/basics.md b/docs/developer/basics.md similarity index 100% rename from docs/config/basics.md rename to docs/developer/basics.md diff --git a/docs/config/carbon-ads.md b/docs/developer/carbon-ads.md similarity index 100% rename from docs/config/carbon-ads.md rename to docs/developer/carbon-ads.md diff --git a/docs/config/homepage.md b/docs/developer/homepage.md similarity index 84% rename from docs/config/homepage.md rename to docs/developer/homepage.md index 0abaad7b..4e548f86 100644 --- a/docs/config/homepage.md +++ b/docs/developer/homepage.md @@ -1,6 +1,6 @@ # Theme Config: Homepage -VitePress provides a homepage layout. To use it, specify `home: true` plus some other metadata in your root `index.md`'s [YAML frontmatter](../guide/frontmatter). This is an example of how it works: +VitePress provides a homepage layout. To use it, specify `home: true` plus some other metadata in your root `index.md`'s YAML frontmatter. This is an example of how it works: ```yaml --- diff --git a/docs/en_US/config/algolia-search.md b/docs/en_US/config/algolia-search.md deleted file mode 100644 index 132b0a56..00000000 --- a/docs/en_US/config/algolia-search.md +++ /dev/null @@ -1,53 +0,0 @@ -# Theme Config: Algolia Search - -The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://docsearch.algolia.com). To enable it, you need to provide at least appId, apiKey and indexName: - -```js -module.exports = { - themeConfig: { - algolia: { - appId: 'your_app_id', - apiKey: 'your_api_key', - indexName: 'index_name' - } - } -} -``` - -For more options, check out [Algolia DocSearch's documentation](https://docsearch.algolia.com/docs/api/). You can pass any extra option alongside other options, e.g. passing `searchParameters`: - -```js -module.exports = { - themeConfig: { - algolia: { - appId: 'your_app_id', - apiKey: 'your_api_key', - indexName: 'index_name', - searchParameters: { - facetFilters: ['tags:guide,api'] - } - } - } -} -``` - -## Internationalization (i18n) - -If you have multiple locales in your documentation and you have defined a `locales` object in your `themeConfig`: - -```js -module.exports = { - themeConfig: { - locales: { - // ... - }, - algolia: { - appId: 'your_app_id', - apiKey: 'your_api_key', - indexName: 'index_name' - } - } -} -``` - -VitePress will automatically add a `lang` _facetFilter_ to the `searchParameters.facetFilter` array with the correct language value. Algolia automatically adds the correct facet filter based on the `lang` attribute on the `` tag. This will match search results with the currently viewed language of the page. diff --git a/docs/en_US/config/basics.md b/docs/en_US/config/basics.md deleted file mode 100644 index 5955ecb5..00000000 --- a/docs/en_US/config/basics.md +++ /dev/null @@ -1,59 +0,0 @@ -# App Config: Basics - -::: tip -The config reference is incomplete since the config format may still receive further changes. For a complete reference of the current available options, refer to [config.ts](https://github.com/vuejs/vitepress/blob/45b65ce8b63bd54f345bfc3383eb2416b6769dc9/src/node/config.ts#L30-L65). -::: - -## base - -- Type: `string` -- Default: `/` - -The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path, for example, GitHub pages. If you plan to deploy your site to `https://foo.github.io/bar/`, then you should set base to `'/bar/'`. It should always start and end with a slash. - -The `base` is automatically prepended to all the URLs that start with `/` in other options, so you only need to specify it once. - -```js -module.exports = { - base: '/base/' -} -``` - -## lang - -- Type: `string` -- Default: `en-US` - -The `lang` attribute for the site. This will render as a `` tag in the page HTML. - -```js -module.exports = { - lang: 'en-US' -} -``` - -## title - -- Type: `string` -- Default: `VitePress` - -Title for the site. This will be the suffix for all page titles, and displayed in the navbar. - -```js -module.exports = { - title: 'VitePress' -} -``` - -## description - -- Type: `string` -- Default: `A VitePress site` - -Description for the site. This will render as a `` tag in the page HTML. - -```js -module.exports = { - description: 'A VitePress site' -} -``` diff --git a/docs/en_US/config/carbon-ads.md b/docs/en_US/config/carbon-ads.md deleted file mode 100644 index 3bb074d1..00000000 --- a/docs/en_US/config/carbon-ads.md +++ /dev/null @@ -1,15 +0,0 @@ -# Theme Config: Carbon Ads - -VitePress has built in native support for [Carbon Ads](https://www.carbonads.net). By defining the Carbon Ads credentials in config, VitePress will display ads on the page. - -```js -module.exports = { - themeConfig: { - carbonAds: { - carbon: 'your-carbon-key', - custom: 'your-carbon-custom', - placement: 'your-carbon-placement' - } - } -} -``` diff --git a/docs/en_US/config/homepage.md b/docs/en_US/config/homepage.md deleted file mode 100644 index 0abaad7b..00000000 --- a/docs/en_US/config/homepage.md +++ /dev/null @@ -1,23 +0,0 @@ -# Theme Config: Homepage - -VitePress provides a homepage layout. To use it, specify `home: true` plus some other metadata in your root `index.md`'s [YAML frontmatter](../guide/frontmatter). This is an example of how it works: - -```yaml ---- -home: true -heroImage: /logo.png -heroAlt: Logo image -heroText: Hero Title -tagline: Hero subtitle -actionText: Get Started -actionLink: /guide/ -features: - - title: Simplicity First - details: Minimal setup with markdown-centered project structure helps you focus on writing. - - title: Vue-Powered - details: Enjoy the dev experience of Vue + webpack, use Vue components in markdown, and develop custom themes with Vue. - - title: Performant - details: VitePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded. -footer: MIT Licensed | Copyright © 2019-present Evan You ---- -``` diff --git a/docs/en_US/developer/algolia-search.md b/docs/en_US/developer/algolia-search.md new file mode 100644 index 00000000..c7035b8c --- /dev/null +++ b/docs/en_US/developer/algolia-search.md @@ -0,0 +1 @@ +# Theme Config: Algolia Search \ No newline at end of file diff --git a/docs/en_US/developer/basics.md b/docs/en_US/developer/basics.md new file mode 100644 index 00000000..c2ced44a --- /dev/null +++ b/docs/en_US/developer/basics.md @@ -0,0 +1 @@ +# App Config: Basics \ No newline at end of file diff --git a/docs/en_US/developer/carbon-ads.md b/docs/en_US/developer/carbon-ads.md new file mode 100644 index 00000000..1d7edbdb --- /dev/null +++ b/docs/en_US/developer/carbon-ads.md @@ -0,0 +1 @@ +# Theme Config: Carbon Ads \ No newline at end of file diff --git a/docs/en_US/developer/homepage.md b/docs/en_US/developer/homepage.md new file mode 100644 index 00000000..7cba25be --- /dev/null +++ b/docs/en_US/developer/homepage.md @@ -0,0 +1 @@ +# Theme Config: Homepage \ No newline at end of file diff --git a/docs/en_US/guide/dashboard.md b/docs/en_US/guide/dashboard.md index 50e37867..901e81cf 100644 --- a/docs/en_US/guide/dashboard.md +++ b/docs/en_US/guide/dashboard.md @@ -84,7 +84,7 @@ location ~ ^/(ws|terminal/.+)$ { * CaddyServer v1(v2 无需特别配置) - ```Caddyfile + ``` proxy /ws http://ip:8008 { websocket } diff --git a/docs/en_US/guide/notifications.md b/docs/en_US/guide/notifications.md new file mode 100644 index 00000000..6f96b7b2 --- /dev/null +++ b/docs/en_US/guide/notifications.md @@ -0,0 +1 @@ +notifications \ No newline at end of file diff --git a/docs/en_US/guide/q1.md b/docs/en_US/guide/q1.md new file mode 100644 index 00000000..6c207e9f --- /dev/null +++ b/docs/en_US/guide/q1.md @@ -0,0 +1 @@ +q1 \ No newline at end of file diff --git a/docs/en_US/guide/q2.md b/docs/en_US/guide/q2.md new file mode 100644 index 00000000..e94e28aa --- /dev/null +++ b/docs/en_US/guide/q2.md @@ -0,0 +1 @@ +q2 \ No newline at end of file diff --git a/docs/en_US/guide/q3.md b/docs/en_US/guide/q3.md new file mode 100644 index 00000000..d22aac2f --- /dev/null +++ b/docs/en_US/guide/q3.md @@ -0,0 +1 @@ +q3 \ No newline at end of file diff --git a/docs/en_US/guide/q4.md b/docs/en_US/guide/q4.md new file mode 100644 index 00000000..02b199a8 --- /dev/null +++ b/docs/en_US/guide/q4.md @@ -0,0 +1 @@ +q4 \ No newline at end of file diff --git a/docs/en_US/guide/q5.md b/docs/en_US/guide/q5.md new file mode 100644 index 00000000..e61aa1df --- /dev/null +++ b/docs/en_US/guide/q5.md @@ -0,0 +1 @@ +q5 \ No newline at end of file diff --git a/docs/en_US/guide/servers.md b/docs/en_US/guide/servers.md new file mode 100644 index 00000000..3e8021f8 --- /dev/null +++ b/docs/en_US/guide/servers.md @@ -0,0 +1 @@ +servers \ No newline at end of file diff --git a/docs/en_US/guide/services.md b/docs/en_US/guide/services.md new file mode 100644 index 00000000..fe6237f3 --- /dev/null +++ b/docs/en_US/guide/services.md @@ -0,0 +1 @@ +services \ No newline at end of file diff --git a/docs/en_US/guide/settings.md b/docs/en_US/guide/settings.md new file mode 100644 index 00000000..fe5dd4a2 --- /dev/null +++ b/docs/en_US/guide/settings.md @@ -0,0 +1 @@ +settings \ No newline at end of file diff --git a/docs/en_US/guide/tasks.md b/docs/en_US/guide/tasks.md new file mode 100644 index 00000000..413c601e --- /dev/null +++ b/docs/en_US/guide/tasks.md @@ -0,0 +1 @@ +tasks \ No newline at end of file diff --git a/docs/en_US/index.md b/docs/en_US/index.md index 9185930b..12176f39 100644 --- a/docs/en_US/index.md +++ b/docs/en_US/index.md @@ -1 +1,16 @@ -## What is Nezha Monitoring? \ No newline at end of file +--- +home: true +heroImage: https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg +heroText: Nezha Monitoring +tagline: Self-hosted lightweight multi-server and website monitoring and alerting. +actionText: Learn more → +actionLink: /en_US/guide/dashboard +features: +- title: 特性1 + details: 特性1特性1特性1 +- title: 特性2 + details: 特性2特性2特性2 +- title: 特性3 + details: 特性3特性3特性3 +footer: Licence | Copyright © 2022-present Nezhahq +--- \ No newline at end of file diff --git a/docs/guide/dashboard.md b/docs/guide/dashboard.md index f84bf0de..3b850c34 100644 --- a/docs/guide/dashboard.md +++ b/docs/guide/dashboard.md @@ -84,7 +84,7 @@ location ~ ^/(ws|terminal/.+)$ { * CaddyServer v1(v2 无需特别配置) - ```Caddyfile + ``` proxy /ws http://ip:8008 { websocket } diff --git a/docs/guide/notifications.md b/docs/guide/notifications.md new file mode 100644 index 00000000..09a4b3c6 --- /dev/null +++ b/docs/guide/notifications.md @@ -0,0 +1 @@ +# 通知 \ No newline at end of file diff --git a/docs/guide/q1.md b/docs/guide/q1.md new file mode 100644 index 00000000..e8b12d9c --- /dev/null +++ b/docs/guide/q1.md @@ -0,0 +1 @@ +# 问题1 \ No newline at end of file diff --git a/docs/guide/q2.md b/docs/guide/q2.md new file mode 100644 index 00000000..a5ef732c --- /dev/null +++ b/docs/guide/q2.md @@ -0,0 +1 @@ +# 问题2 \ No newline at end of file diff --git a/docs/guide/q3.md b/docs/guide/q3.md new file mode 100644 index 00000000..555d1765 --- /dev/null +++ b/docs/guide/q3.md @@ -0,0 +1 @@ +# 问题3 \ No newline at end of file diff --git a/docs/guide/q4.md b/docs/guide/q4.md new file mode 100644 index 00000000..605deeff --- /dev/null +++ b/docs/guide/q4.md @@ -0,0 +1 @@ +# 问题4 \ No newline at end of file diff --git a/docs/guide/q5.md b/docs/guide/q5.md new file mode 100644 index 00000000..948c7ebf --- /dev/null +++ b/docs/guide/q5.md @@ -0,0 +1 @@ +# 问题5 \ No newline at end of file diff --git a/docs/guide/servers.md b/docs/guide/servers.md new file mode 100644 index 00000000..f6c0bb6b --- /dev/null +++ b/docs/guide/servers.md @@ -0,0 +1 @@ +# 服务器 \ No newline at end of file diff --git a/docs/guide/services.md b/docs/guide/services.md new file mode 100644 index 00000000..0ad17041 --- /dev/null +++ b/docs/guide/services.md @@ -0,0 +1 @@ +# 服务 \ No newline at end of file diff --git a/docs/guide/settings.md b/docs/guide/settings.md new file mode 100644 index 00000000..ad5c73bd --- /dev/null +++ b/docs/guide/settings.md @@ -0,0 +1 @@ +# 设置 \ No newline at end of file diff --git a/docs/guide/tasks.md b/docs/guide/tasks.md new file mode 100644 index 00000000..fb191124 --- /dev/null +++ b/docs/guide/tasks.md @@ -0,0 +1 @@ +# 任务 \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index a37311ba..4acd13c6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1 +1,16 @@ -## 哪吒监控是什么? \ No newline at end of file +--- +home: true +heroImage: https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg +heroText: 哪吒监控 +tagline: 轻量的自托管监控、运维工具 +actionText: 开始使用 → +actionLink: /guide/dashboard +features: +- title: 特性1 + details: 特性1特性1特性1 +- title: 特性2 + details: 特性2特性2特性2 +- title: 特性3 + details: 特性3特性3特性3 +footer: Licence | Copyright © 2022-present Nezhahq +--- \ No newline at end of file