Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow rel for socials links to be configured #899

Merged
merged 4 commits into from May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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