Skip to content

Commit 5d18fd8

Browse files
authored
feat: rel for feature links (#2704)
1 parent 60dd0a4 commit 5d18fd8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/reference/default-theme-home-page.md

+5
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ interface Feature {
139139
//
140140
// e.g. `Learn more`, `Visit page`, etc.
141141
linkText?: string
142+
143+
// Link rel attribute for the `link` option.
144+
//
145+
// e.g. `external`
146+
rel?: string
142147
}
143148

144149
type FeatureIcon =

src/client/theme-default/components/VPFeature.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ defineProps<{
1010
details?: string
1111
link?: string
1212
linkText?: string
13+
rel?: string
1314
}>()
1415
</script>
1516

1617
<template>
17-
<VPLink class="VPFeature" :href="link" :no-icon="true" :tag="link ? 'a' : 'div'">
18+
<VPLink class="VPFeature" :href="link" :rel="rel" :no-icon="true" :tag="link ? 'a' : 'div'">
1819
<article class="box">
1920
<VPImage
2021
v-if="typeof icon === 'object'"

src/client/theme-default/components/VPFeatures.vue

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface Feature {
99
details: string
1010
link?: string
1111
linkText?: string
12+
rel?: string
1213
}
1314
1415
const props = defineProps<{
@@ -48,6 +49,7 @@ const grid = computed(() => {
4849
:details="feature.details"
4950
:link="feature.link"
5051
:link-text="feature.linkText"
52+
:rel="feature.rel"
5153
/>
5254
</div>
5355
</div>

0 commit comments

Comments
 (0)