File tree Expand file tree Collapse file tree
app/pages/open-source/packages/[slug]/docs/[version] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,11 @@ const title = computed(() => {
6767 return match ? match [1 ] : pkg .name
6868})
6969
70+ const gitHubFileUrl = computed (() => {
71+ const branch = pkgVersion ! .gitBranch || pkgVersion ! .version
72+ return ` https://github.com/${pkg .github .owner }/${pkg .github .repo }/edit/${branch }/docs/${docPath }.md `
73+ })
74+
7075useSeoMeta ({
7176 title: ` ${title .value } | ${pkg .name } ${pkgVersion ! .version } Documentation ` ,
7277})
@@ -210,6 +215,18 @@ onUnmounted(() => {
210215 <MDC class =" docs-content" :value =" docData?.content ?? ''" tag =" div" />
211216 </div >
212217 </div >
218+
219+ <div class =" mt-4 text-right text-sm" >
220+ <a
221+ :href =" gitHubFileUrl"
222+ target =" _blank"
223+ rel =" noopener noreferrer"
224+ class =" hover:text-brand-orange inline-flex items-center gap-1 text-gray-500 transition-colors duration-200"
225+ >
226+ <Icon name =" fa7-brands:github" class =" h-4 w-4 fill-current" />
227+ Help improve this page
228+ </a >
229+ </div >
213230 </main >
214231 </div >
215232 </div >
You can’t perform that action at this time.
0 commit comments