diff --git a/layer/app/components/app/AppFooterRight.vue b/layer/app/components/app/AppFooterRight.vue index fb6bbe5d4..b9416ddbc 100644 --- a/layer/app/components/app/AppFooterRight.vue +++ b/layer/app/components/app/AppFooterRight.vue @@ -8,7 +8,7 @@ const links = computed(() => [ 'target': '_blank', 'aria-label': `${key} social link`, })), - appConfig.github?.url && { + appConfig.github && appConfig.github.url && { 'icon': 'i-simple-icons-github', 'to': appConfig.github.url, 'target': '_blank', diff --git a/layer/app/components/app/AppHeader.vue b/layer/app/components/app/AppHeader.vue index cd2bb0c44..03fa318d1 100644 --- a/layer/app/components/app/AppHeader.vue +++ b/layer/app/components/app/AppHeader.vue @@ -6,7 +6,7 @@ const site = useSiteConfig() const { localePath, isEnabled, locales } = useDocusI18n() -const links = computed(() => appConfig.github?.url +const links = computed(() => appConfig.github && appConfig.github.url ? [ { 'icon': 'i-simple-icons-github', diff --git a/layer/app/pages/[[lang]]/[...slug].vue b/layer/app/pages/[[lang]]/[...slug].vue index 16f5793d0..8d3fbe6a3 100644 --- a/layer/app/pages/[[lang]]/[...slug].vue +++ b/layer/app/pages/[[lang]]/[...slug].vue @@ -46,16 +46,18 @@ defineOgImageComponent('Docs', { headline: headline.value, }) +const github = computed(() => appConfig.github ? appConfig.github : null) + const editLink = computed(() => { - if (!appConfig.github) { + if (!github.value) { return } return [ - appConfig.github.url, + github.value.url, 'edit', - appConfig.github.branch, - appConfig.github.rootDir, + github.value.branch, + github.value.rootDir, 'content', `${page.value?.stem}.${page.value?.extension}`, ].filter(Boolean).join('/') @@ -92,7 +94,7 @@ const editLink = computed(() => {
{