From ded42e797da834f7c7cf07c9ebd9638c02e9e806 Mon Sep 17 00:00:00 2001 From: ZTL-UwU Date: Mon, 11 Nov 2024 13:50:08 +0800 Subject: [PATCH] feat: edit this page link Signed-off-by: ZTL-UwU --- app.config.ts | 6 + components/content/ProseA.vue | 2 +- components/content/ProseH1.vue | 2 +- components/content/ProseH2.vue | 2 +- components/content/ProseH3.vue | 2 +- components/content/ProseH4.vue | 2 +- components/content/ProseH5.vue | 2 +- components/content/ProseH6.vue | 2 +- components/layout/DocsFooter.vue | 12 ++ components/layout/EditLink.vue | 26 ++++ components/layout/PrevNext.vue | 2 +- composables/useConfig.ts | 6 + .../{1.Introduction.md => 1.introduction.md} | 0 .../3.api/1.configuration/1.shadcn-docs.md | 128 +++--------------- content/3.api/1.configuration/4.carbon-ads.md | 17 +++ content/3.api/1.configuration/5.edit-link.md | 45 ++++++ pages/[...slug].vue | 2 +- types/index.d.ts | 8 +- 18 files changed, 147 insertions(+), 119 deletions(-) create mode 100644 components/layout/DocsFooter.vue create mode 100644 components/layout/EditLink.vue rename content/1.getting-started/{1.Introduction.md => 1.introduction.md} (100%) create mode 100644 content/3.api/1.configuration/5.edit-link.md diff --git a/app.config.ts b/app.config.ts index dacaf3a9..008e318c 100644 --- a/app.config.ts +++ b/app.config.ts @@ -75,6 +75,12 @@ export default defineAppConfig({ breadCrumb: true, showTitle: true, codeCopyToast: true, + editLink: { + enable: true, + pattern: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt/tree/main/content/:path', + text: 'Edit this page on GitHub', + icon: 'lucide:square-pen', + }, codeIcon: { 'package.json': 'vscode-icons:file-type-node', 'tsconfig.json': 'vscode-icons:file-type-tsconfig', diff --git a/components/content/ProseA.vue b/components/content/ProseA.vue index 15c30afd..8c8dbd12 100644 --- a/components/content/ProseA.vue +++ b/components/content/ProseA.vue @@ -1,6 +1,6 @@