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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow social icons to be a full URL #923

Merged
merged 4 commits into from Jun 30, 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
17 changes: 7 additions & 10 deletions .starters/default/app.config.ts
Expand Up @@ -4,8 +4,13 @@ export default defineAppConfig({
description: 'The best place to start your documentation.',
image: 'https://user-images.githubusercontent.com/904724/185365452-87b7ca7b-6030-4813-a2db-5e65c785bf88.png',
socials: {
twitter: 'nuxtstudio',
github: 'nuxt-themes/docus'
twitter: 'nuxt_js',
github: 'nuxt-themes/docus',
nuxt: {
label: 'Nuxt',
icon: 'simple-icons:nuxtdotjs',
href: 'https://nuxt.com'
}
},
github: {
dir: '.starters/default/content',
Expand All @@ -28,14 +33,6 @@ export default defineAppConfig({
showLinkIcon: true,
exclude: [],
fluid: true
},
footer: {
iconLinks: [
{
href: 'https://nuxt.com',
icon: 'simple-icons:nuxtdotjs'
}
]
}
}
})
4 changes: 2 additions & 2 deletions .starters/default/content/1.introduction/4.configuration.md
Expand Up @@ -22,8 +22,8 @@ export default defineAppConfig({
url: 'http://docus.dev',
image: '/social-card-preview.png',
socials: {
twitter: '@docus_',
github: 'nuxtlabs/docus',
twitter: '@nuxt_js',
github: 'nuxt-themes/docus',
},
github: {
root: 'content',
Expand Down
2 changes: 1 addition & 1 deletion components/app/AppSocialIcons.vue
Expand Up @@ -10,7 +10,7 @@ const icons = computed<any>(() => {
return value
} else if (typeof value === 'string' && value && socials.includes(key)) {
return {
href: `https://${key}.com/${value}`,
href: /^https?:\/\//.test(value) ? value : `https://${key}.com/${value}`,
icon: `fa-brands:${key}`,
label: value,
rel: 'noopener noreferrer'
Expand Down