Skip to content

Commit 16f5e35

Browse files
authored
fix(links): handle app.baseURL in Markdown generated link (#1221)
1 parent 87f3cf7 commit 16f5e35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layer/app/components/docs/DocsPageHeaderLinks.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<script setup lang="ts">
22
import { useClipboard } from '@vueuse/core'
3+
import { useRuntimeConfig } from '#imports'
34
45
const route = useRoute()
6+
const appBaseURL = useRuntimeConfig().app?.baseURL || '/'
57
68
const { copy, copied } = useClipboard()
79
const { t } = useDocusI18n()
810
9-
const markdownLink = computed(() => `${window?.location?.origin}/raw${route.path}.md`)
11+
const markdownLink = computed(() => `${window?.location?.origin}${appBaseURL}raw${route.path}.md`)
1012
const items = [
1113
{
1214
label: t('docs.copy.link'),

0 commit comments

Comments
 (0)