From 9f4bb109d9db5e569347597f1f7ae3d989b1d238 Mon Sep 17 00:00:00 2001 From: zernonia Date: Thu, 7 Sep 2023 17:17:11 +0800 Subject: [PATCH] docs: update all link to gh --- apps/www/.vitepress/config.mts | 2 +- .../.vitepress/theme/components/ExamplesNav.vue | 14 +++++++------- apps/www/.vitepress/theme/config/docs.ts | 14 +++++++------- apps/www/.vitepress/theme/layout/DocsLayout.vue | 4 +++- apps/www/src/content/docs/components/accordion.md | 2 +- .../src/content/docs/components/alert-dialog.md | 2 +- .../src/content/docs/components/aspect-ratio.md | 2 +- apps/www/src/content/docs/components/avatar.md | 2 +- apps/www/src/content/docs/components/checkbox.md | 2 +- .../www/src/content/docs/components/collapsible.md | 2 +- .../src/content/docs/components/context-menu.md | 2 +- apps/www/src/content/docs/components/dialog.md | 2 +- .../src/content/docs/components/dropdown-menu.md | 2 +- apps/www/src/content/docs/components/hover-card.md | 2 +- apps/www/src/content/docs/components/label.md | 2 +- apps/www/src/content/docs/components/menubar.md | 2 +- .../src/content/docs/components/navigation-menu.md | 2 +- apps/www/src/content/docs/components/popover.md | 2 +- apps/www/src/content/docs/components/progress.md | 2 +- .../www/src/content/docs/components/radio-group.md | 2 +- .../www/src/content/docs/components/scroll-area.md | 2 +- apps/www/src/content/docs/components/select.md | 2 +- apps/www/src/content/docs/components/separator.md | 2 +- apps/www/src/content/docs/components/sheet.md | 2 +- apps/www/src/content/docs/components/slider.md | 2 +- apps/www/src/content/docs/components/switch.md | 2 +- apps/www/src/content/docs/components/tabs.md | 2 +- apps/www/src/content/docs/components/toggle.md | 2 +- apps/www/src/content/docs/components/tooltip.md | 2 +- 29 files changed, 43 insertions(+), 41 deletions(-) diff --git a/apps/www/.vitepress/config.mts b/apps/www/.vitepress/config.mts index 9ecd2f26..d72b958c 100644 --- a/apps/www/.vitepress/config.mts +++ b/apps/www/.vitepress/config.mts @@ -38,7 +38,7 @@ export default defineConfig({ provider: 'local', }, editLink: { - pattern: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/:path', + pattern: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/:path', text: 'Edit this page on GitHub', }, }, diff --git a/apps/www/.vitepress/theme/components/ExamplesNav.vue b/apps/www/.vitepress/theme/components/ExamplesNav.vue index eb2c9d57..87265ecf 100644 --- a/apps/www/.vitepress/theme/components/ExamplesNav.vue +++ b/apps/www/.vitepress/theme/components/ExamplesNav.vue @@ -11,37 +11,37 @@ const examples = [ { name: 'Dashboard', href: '/examples/dashboard', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/dashboard', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/dashboard', }, { name: 'Cards', href: '/examples/cards', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/cards', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/cards', }, { name: 'Tasks', href: '/examples/tasks', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/tasks', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/tasks', }, { name: 'Playground', href: '/examples/playground', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/playground', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/playground', }, { name: 'Forms', href: '/examples/forms', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/forms', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/forms', }, { name: 'Music', href: '/examples/music', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/music', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/music', }, { name: 'Authentication', href: '/examples/authentication', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/app/examples/authentication', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/authentication', }, ] diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts index ceddcfa6..0108ce3f 100644 --- a/apps/www/.vitepress/theme/config/docs.ts +++ b/apps/www/.vitepress/theme/config/docs.ts @@ -321,37 +321,37 @@ export const examples: Example[] = [ { name: 'Dashboard', href: '/examples/dashboard', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/examples/dashboard', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/dashboard', }, { name: 'Cards', href: '/examples/cards', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/examples/cards', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/cards', }, // { // name: "Tasks", // href: "/examples/tasks", // label: "New", - // code: "https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/examples/tasks" + // code: "https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/tasks" // }, { name: 'Playground', href: '/examples/playground', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/examples/playground', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/playground', }, { name: 'Music', href: '/examples/music', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/examples/music', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/music', }, { name: 'Authentication', href: '/examples/authentication', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/examples/authentication', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/examples/authentication', }, { name: 'Forms', href: '/examples/forms', - code: 'https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/routes/examples/forms', + code: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/routes/examples/forms', }, ] diff --git a/apps/www/.vitepress/theme/layout/DocsLayout.vue b/apps/www/.vitepress/theme/layout/DocsLayout.vue index 09c58c80..522d776f 100644 --- a/apps/www/.vitepress/theme/layout/DocsLayout.vue +++ b/apps/www/.vitepress/theme/layout/DocsLayout.vue @@ -10,6 +10,8 @@ import ChevronRightIcon from '~icons/lucide/chevron-right' const $route = useRoute() const { frontmatter } = useData() + +const sourceLink = 'https://github.com/radix-vue/shadcn-vue/tree/dev/'