support target in header links

This commit is contained in:
lightling 2024-04-13 01:05:57 -04:00
parent b031ba16d2
commit e23e213dc3
2 changed files with 8 additions and 0 deletions

View file

@ -26,9 +26,11 @@ li.header-entry
a(
v-else-if='!sameSite'
:href='entry.path'
:target='entry.target || "_self"'
) {{ entry.displayName }}
router-link(
v-else
:to='{ name }'
:target='entry.target || "_self"'
) {{ entry.displayName }}
</template>

View file

@ -100,6 +100,12 @@ declare module 'content/routes.js' {
displayName: string
} & ({
path: string
target?:
| '_self'
| '_blank'
| '_parent'
| '_top'
| '_unfencedTop'
} | {
children: HeaderEntry[]
})