From 9ba6174c5264bc5cc8b80cdc96ad357e549c27dc Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Sun, 21 Apr 2024 13:27:14 +0800 Subject: [PATCH] docs: completed documentations about cli Signed-off-by: Neko Ayaka --- docs/.vitepress/config.mts | 60 +++++- .../components/GettingStartedBlocksEn.vue | 4 +- .../components/GettingStartedBlocksZhCn.vue | 4 +- docs/pages/en/guide/getting-started/cli.md | 4 + docs/pages/en/guide/getting-started/crd.md | 8 +- .../en/references/cli/commands/deploy.md | 163 ++++++++++++++++ .../en/references/cli/commands/expose.md | 118 ++++++++++++ .../en/references/cli/commands/undeploy.md | 39 ++++ docs/pages/en/references/cli/index.md | 5 + docs/pages/en/references/crd.md | 20 -- docs/pages/en/references/crd/index.md | 3 + docs/pages/en/references/crd/model.md | 28 +++ docs/pages/zh-CN/guide/getting-started/cli.md | 4 + docs/pages/zh-CN/guide/getting-started/crd.md | 8 +- .../zh-CN/references/cli/commands/deploy.md | 179 ++++++++++++++++++ .../zh-CN/references/cli/commands/expose.md | 96 ++++++++++ .../zh-CN/references/cli/commands/undeploy.md | 39 ++++ docs/pages/zh-CN/references/cli/index.md | 5 + docs/pages/zh-CN/references/crd.md | 20 -- docs/pages/zh-CN/references/crd/index.md | 3 + docs/pages/zh-CN/references/crd/model.md | 28 +++ internal/cli/kollama/cmd_deploy.go | 24 +-- internal/cli/kollama/cmd_expose.go | 8 +- pkg/model/image_store.go | 25 +-- pkg/model/model.go | 28 ++- 25 files changed, 827 insertions(+), 96 deletions(-) create mode 100644 docs/pages/en/references/cli/commands/deploy.md create mode 100644 docs/pages/en/references/cli/commands/expose.md create mode 100644 docs/pages/en/references/cli/commands/undeploy.md create mode 100644 docs/pages/en/references/cli/index.md delete mode 100644 docs/pages/en/references/crd.md create mode 100644 docs/pages/en/references/crd/index.md create mode 100644 docs/pages/en/references/crd/model.md create mode 100644 docs/pages/zh-CN/references/cli/commands/deploy.md create mode 100644 docs/pages/zh-CN/references/cli/commands/expose.md create mode 100644 docs/pages/zh-CN/references/cli/commands/undeploy.md create mode 100644 docs/pages/zh-CN/references/cli/index.md delete mode 100644 docs/pages/zh-CN/references/crd.md create mode 100644 docs/pages/zh-CN/references/crd/index.md create mode 100644 docs/pages/zh-CN/references/crd/model.md diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 70a280d..ef5a772 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,7 +1,8 @@ +import { text } from 'stream/consumers' import { defineConfig } from 'vitepress' import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs' -// https://vitepress.dev/reference/site-config +// https://vitepress.dev/references/site-config export default defineConfig({ markdown: { config(md) { @@ -13,7 +14,7 @@ export default defineConfig({ lastUpdated: true, ignoreDeadLinks: [ // Site Config | VitePress - // https://vitepress.dev/reference/site-config#ignoredeadlinks + // https://vitepress.dev/references/site-config#ignoredeadlinks // // ignore all localhost links /^https?:\/\/localhost/, @@ -82,7 +83,8 @@ export default defineConfig({ { text: 'Reference', items: [ - { text: 'CRD definition', link: '/pages/en/references/crd' }, + { text: 'CLI Reference', link: '/pages/en/references/cli/' }, + { text: 'CRD Reference', link: '/pages/en/references/crd/' }, { text: 'Architectural Design', link: '/pages/en/references/architectural-design' }, ] }, @@ -110,7 +112,27 @@ export default defineConfig({ { text: 'Reference', items: [ - { text: 'CRD definition', link: '/pages/en/references/crd' }, + { + text: 'CLI Reference', + items: [ + { text: 'Commands list', link: '/pages/en/references/cli/' }, + { + text: 'Commands', + items: [ + { text: 'kollama deploy', link: '/pages/en/references/cli/commands/deploy' }, + { text: 'kollama undeploy', link: '/pages/en/references/cli/commands/undeploy' }, + { text: 'kollama expose', link: '/pages/en/references/cli/commands/undeploy' } + ] + } + ] + }, + { + text: 'CRD Reference', + items: [ + { text: 'CRD list', link: '/pages/en/references/crd/' }, + { text: 'Model', link: '/pages/en/references/crd/model' } + ] + }, { text: 'Architectural Design', link: '/pages/en/references/architectural-design' }, ] }, @@ -147,7 +169,13 @@ export default defineConfig({ { text: '参考', items: [ - { text: 'CRD 定义', link: '/pages/zh-CN/references/crd' }, + { + text: 'CLI 参考', + items: [ + { text: '命令列表', link: '/pages/zh-CN/references/cli/' }, + ] + }, + { text: 'CRD 参考', link: '/pages/zh-CN/references/crd/' }, { text: '架构设计', link: '/pages/zh-CN/references/architectural-design' }, ] }, @@ -175,7 +203,27 @@ export default defineConfig({ { text: '参考', items: [ - { text: 'CRD 定义', link: '/pages/zh-CN/references/crd' }, + { + text: 'CLI 参考', + items: [ + { text: '命令列表', link: '/pages/zh-CN/references/cli/' }, + { + text: '子命令', + items: [ + { text: 'kollama deploy', link: '/pages/zh-CN/references/cli/commands/deploy' }, + { text: 'kollama undeploy', link: '/pages/zh-CN/references/cli/commands/undeploy' }, + { text: 'kollama expose', link: '/pages/zh-CN/references/cli/commands/undeploy' } + ] + } + ] + }, + { + text: 'CRD 参考', + items: [ + { text: 'CRD 列表', link: '/pages/zh-CN/references/crd/' }, + { text: 'Model 模型资源', link: '/pages/zh-CN/references/crd/model' } + ] + }, { text: '架构设计', link: '/pages/zh-CN/references/architectural-design' }, ] }, diff --git a/docs/.vitepress/theme/components/GettingStartedBlocksEn.vue b/docs/.vitepress/theme/components/GettingStartedBlocksEn.vue index 3566cbc..16004d3 100644 --- a/docs/.vitepress/theme/components/GettingStartedBlocksEn.vue +++ b/docs/.vitepress/theme/components/GettingStartedBlocksEn.vue @@ -1,7 +1,7 @@