@@ -63,6 +63,31 @@ const sourceUrl = computed(() =>
6363 : undefined ,
6464)
6565
66+ const threadIdMappings: { [key : string ]: number } = {
67+ ' 0.index.md' : 85 ,
68+ ' 1.vue/1.index.md' : 68 ,
69+ ' 1.vue/2.reactivity/index.md' : 71 ,
70+ ' 1.vue/3.reactivity-2/index.md' : 72 ,
71+ ' 1.vue/4.composition-api/index.md' : 73 ,
72+ ' 1.vue/5.components/index.md' : 74 ,
73+ ' 1.vue/6.summary/index.md' : 75 ,
74+ ' 2.concepts/1.index.md' : 76 ,
75+ ' 2.concepts/2.app-vue/index.md' : 77 ,
76+ ' 2.concepts/3.routing/index.md' : 78 ,
77+ ' 2.concepts/4.auto-imports/index.md' : 79 ,
78+ ' 2.concepts/5.middleware/index.md' : 80 ,
79+ ' 2.concepts/6.layout/index.md' : 81 ,
80+ ' 2.concepts/7.rendering-modes/index.md' : 82 ,
81+ ' 2.concepts/8.state-manegement/index.md' : 83 ,
82+ ' 2.concepts/9.data-fetching/index.md' : 84 ,
83+ }
84+
85+ const threadUrl = computed (() =>
86+ page .value ?._file
87+ ? ` https://github.com/vuejs-jp/learn.nuxt.com/discussions/${threadIdMappings [page .value ._file ]} `
88+ : undefined ,
89+ )
90+
6691const docsEl = ref <HTMLElement | null >(null )
6792const router = useRouter ()
6893router .beforeEach (() => {
@@ -118,7 +143,7 @@ router.beforeEach(() => {
118143 />
119144 </div >
120145 </div >
121- <div border =" t base dashed" mt-8 p3 >
146+ <div flex = " ~ items-center gap-4 " border =" t base dashed" mt-8 p3 >
122147 <NuxtLink
123148 v-if =" sourceUrl"
124149 :to =" sourceUrl" target =" _blank"
@@ -129,6 +154,17 @@ router.beforeEach(() => {
129154 <div i-ph-note-pencil-duotone />
130155 Edit this page
131156 </NuxtLink >
157+ <NuxtLink
158+ v-if =" threadUrl"
159+ :to =" threadUrl"
160+ target =" _blank"
161+ flex =" ~ items-center gap-2"
162+ text-inherit op75
163+ hover =" text-primary op100"
164+ >
165+ <div i-ph-arrow-square-out-fill />
166+ Ask your question
167+ </NuxtLink >
132168 </div >
133169 </article >
134170 <!-- Navigration Dropdown -->
0 commit comments