Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion layer/app/components/app/AppFooterRight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion layer/app/components/app/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 8 additions & 6 deletions layer/app/pages/[[lang]]/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -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('/')
Expand Down Expand Up @@ -92,7 +94,7 @@ const editLink = computed(() => {

<USeparator>
<div
v-if="editLink"
v-if="github"
class="flex items-center gap-2 text-sm text-muted"
>
<UButton
Expand All @@ -109,7 +111,7 @@ const editLink = computed(() => {
<UButton
variant="link"
color="neutral"
:to="`${appConfig.github.url}/issues/new/choose`"
:to="`${github.url}/issues/new/choose`"
target="_blank"
icon="i-lucide-alert-circle"
:ui="{ leadingIcon: 'size-4' }"
Expand Down
Loading