support target in header links
This commit is contained in:
parent
b031ba16d2
commit
e23e213dc3
2 changed files with 8 additions and 0 deletions
|
@ -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>
|
||||
|
|
6
src/content-env.d.ts
vendored
6
src/content-env.d.ts
vendored
|
@ -100,6 +100,12 @@ declare module 'content/routes.js' {
|
|||
displayName: string
|
||||
} & ({
|
||||
path: string
|
||||
target?:
|
||||
| '_self'
|
||||
| '_blank'
|
||||
| '_parent'
|
||||
| '_top'
|
||||
| '_unfencedTop'
|
||||
} | {
|
||||
children: HeaderEntry[]
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue