File tree Expand file tree Collapse file tree 3 files changed +9
-58
lines changed
Expand file tree Collapse file tree 3 files changed +9
-58
lines changed Original file line number Diff line number Diff line change 1616
1717<script setup lang="ts">
1818import type { ParsedContent } from ' @nuxt/content/dist/runtime/types'
19+ import { resolveURL } from ' ufo'
1920
2021const props = defineProps <{
2122 doc: Pick <ParsedContent , string >
2223}>()
2324
2425const githubInfo = useAppConfig ().exactproDocs .github !
2526
26- const { data : editBasePath } = useFetch (
27- ' /api/_docs-toolkit/github/edit-base-path'
27+ const editPath = resolveURL (
28+ githubInfo .repoLink ! ,
29+ ' edit' ,
30+ githubInfo .branch ! ,
31+ githubInfo .docsDir ! ,
32+ props .doc ._source ,
33+ props .doc ._file
2834)
2935
30- const editPath = computed (() => {
31- return ` ${editBasePath .value }/${props .doc ._source }/${props .doc ._file } `
32- })
33-
34- const createIssuePath = computed (() => {
35- return ` ${githubInfo .repoLink }/issues/new/choose `
36- })
36+ const createIssuePath = resolveURL (githubInfo .repoLink ! , ' /issues/new/choose' )
3737 </script >
3838
3939<template >
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments