diff --git a/.gitignore b/.gitignore index 3a8dbce9..f8d1a2ec 100644 --- a/.gitignore +++ b/.gitignore @@ -402,4 +402,5 @@ FodyWeavers.xsd dist/ refs/ *.[Dd]esigner.cs -*.db \ No newline at end of file +*.db +cache \ No newline at end of file diff --git a/docs/manual/docs/.vitepress/config.mts b/docs/manual/docs/.vitepress/config.mts new file mode 100644 index 00000000..06d81a39 --- /dev/null +++ b/docs/manual/docs/.vitepress/config.mts @@ -0,0 +1,29 @@ +import { defineConfig } from 'vitepress' + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + base: "/netadmin/", + title: "NetAdmin", + description: "管理后台快速开发框架", + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: 'Home', link: '/' }, + { text: 'Examples', link: '/markdown-examples' } + ], + + sidebar: [ + { + text: 'Examples', + items: [ + { text: 'Markdown Examples', link: '/markdown-examples' }, + { text: 'Runtime API Examples', link: '/api-examples' } + ] + } + ], + + socialLinks: [ + { icon: 'github', link: 'https://github.com/nsnail/netadmin' } + ] + } +}) \ No newline at end of file diff --git a/docs/manual/docs/api-examples.md b/docs/manual/docs/api-examples.md new file mode 100644 index 00000000..bbf1ed05 --- /dev/null +++ b/docs/manual/docs/api-examples.md @@ -0,0 +1,49 @@ +--- +outline: deep +--- + +# Runtime API Examples + +This page demonstrates usage of some of the runtime APIs provided by VitePress. + +The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: + +```md + + +## Results + +### Theme Data +
{{ theme }}+ +### Page Data +
{{ page }}+ +### Page Frontmatter +
{{ frontmatter }}+``` + + + +## Results + +### Theme Data +
{{ theme }}+ +### Page Data +
{{ page }}+ +### Page Frontmatter +
{{ frontmatter }}+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). \ No newline at end of file diff --git a/docs/manual/docs/index.md b/docs/manual/docs/index.md new file mode 100644 index 00000000..8542b230 --- /dev/null +++ b/docs/manual/docs/index.md @@ -0,0 +1,24 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "NetAdmin" + text: "管理后台快速开发框架" + tagline: 基于C#12/.NET8、Vue3/Vite、Element Plus等现代技术构建,具有十分整洁、优雅的编码规范 + actions: + - theme: brand + text: 快速开始 + link: /markdown-examples + - theme: alt + text: API Examples + link: /api-examples + +features: + - title: Feature A + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature B + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature C + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit +--- \ No newline at end of file diff --git a/docs/manual/docs/markdown-examples.md b/docs/manual/docs/markdown-examples.md new file mode 100644 index 00000000..e554d006 --- /dev/null +++ b/docs/manual/docs/markdown-examples.md @@ -0,0 +1,85 @@ +# Markdown Extension Examples + +This page demonstrates some of the built-in markdown extensions provided by VitePress. + +## Syntax Highlighting + +VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: + +**Input** + +```` +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` +```` + +**Output** + +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` + +## Custom Containers + +**Input** + +```md +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: +``` + +**Output** + +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: + +## More + +Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). \ No newline at end of file diff --git a/docs/manual/package.json b/docs/manual/package.json new file mode 100644 index 00000000..edd08224 --- /dev/null +++ b/docs/manual/package.json @@ -0,0 +1,10 @@ +{ + "scripts": { + "docs:dev": "vitepress dev docs", + "docs:build": "vitepress build docs", + "docs:preview": "vitepress preview docs" + }, + "devDependencies": { + "vitepress": "^1.0.0-rc.27" + } +} \ No newline at end of file