feat: ensure `.html` extension in rendered nav links (#175)

close #175
pull/654/head
Kia Ishii 2 years ago
parent b8c76ba47b
commit ef3e44c5a2

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { normalizeLink } from '../support/utils'
import VPIconExternalLink from './icons/VPIconExternalLink.vue'
const props = defineProps<{
@ -15,7 +16,7 @@ const isExternal = computed(() => props.href && /^[a-z]+:/i.test(props.href))
:is="href ? 'a' : 'span'"
class="VPLink"
:class="{ link: href }"
:href="href"
:href="href ? normalizeLink(href) : undefined"
:target="isExternal ? '_blank' : undefined"
:rel="isExternal ? 'noopener noreferrer' : undefined"
>

Loading…
Cancel
Save