Skip to content

Commit

Permalink
feat: allow rel for socials links to be configured (#899)
Browse files Browse the repository at this point in the history
Co-authored-by: Yaël GUILLOUX <yael.guilloux@gmail.com>
  • Loading branch information
Barbapapazes and Tahul committed May 16, 2023
1 parent a710a9a commit fbd0971
Show file tree
Hide file tree
Showing 5 changed files with 610 additions and 523 deletions.
Expand Up @@ -92,6 +92,7 @@ export default defineAppConfig({
| `socials.[social].label` | `string` | | A label to use for the social |
| `socials.[social].icon` | `string` | | A icon to use for the social |
| `socials.[social].href` | `string` | | A link to use for the social |
| `socials.[social].rel` | `string` | `noopener noreferrer` | A space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types) |
| **Header** | | | |
| `header` | `object` | | Header configuration |
| `header.logo` | `boolean` | | Whether or not to use `Logo.vue` as the header logo |
Expand Down
2 changes: 1 addition & 1 deletion .starters/default/package.json
Expand Up @@ -15,6 +15,6 @@
"@nuxt/devtools": "^0.4.6",
"@nuxt/eslint-config": "^0.1.1",
"eslint": "^8.40.0",
"nuxt": "^3.4.3"
"nuxt": "^3.5.0"
}
}
5 changes: 3 additions & 2 deletions components/app/AppSocialIcons.vue
Expand Up @@ -12,7 +12,8 @@ const icons = computed<any>(() => {
return {
href: `https://${key}.com/${value}`,
icon: `fa-brands:${key}`,
label: value
label: value,
rel: 'noopener noreferrer'
}
} else {
return null
Expand All @@ -26,7 +27,7 @@ const icons = computed<any>(() => {
<NuxtLink
v-for="icon in icons"
:key="icon.label"
rel="noopener noreferrer"
:rel="icon.rel"
:title="icon.label"
:aria-label="icon.label"
:href="icon.href"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -41,13 +41,13 @@
"@nuxt/devtools": "^0.4.6",
"@nuxt/eslint-config": "^0.1.1",
"@nuxtjs/algolia": "^1.7.0",
"@types/node": "^20.1.2",
"@types/node": "^20.1.5",
"eslint": "^8.40.0",
"nuxt": "^3.4.3",
"nuxt": "^3.5.0",
"release-it": "^15.10.3",
"typescript": "^5.0.4",
"vite-plugin-inspect": "^0.7.26",
"vue": "^3.3.1"
"vue": "^3.3.2"
},
"pnpm": {
"peerDependencyRules": {
Expand Down

0 comments on commit fbd0971

Please sign in to comment.