Skip to content

Commit a8e8446

Browse files
committed
docs: update social link interface
1 parent e107e47 commit a8e8446

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/config/theme-configs.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ interface SidebarItem {
130130
}
131131
```
132132

133-
134133
## outlineTitle
135134

136135
- Type: `string`
@@ -148,7 +147,7 @@ export default {
148147

149148
## socialLinks
150149

151-
- Type: `SocialLink`
150+
- Type: `SocialLink[]`
152151

153152
You may define this option to show your social account links with icons in nav.
154153

@@ -158,7 +157,14 @@ export default {
158157
socialLinks: [
159158
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' },
160159
{ icon: 'twitter', link: '...' },
161-
{ icon: 'discord', link: '...' }
160+
// You can also add custom icons by passing SVG as string:
161+
{
162+
icon: {
163+
// [Pro Tip] You can get this from https://simpleicons.org/ for many brands
164+
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Dribbble</title><path d="M12...6.38z"/></svg>'
165+
},
166+
link: '...'
167+
}
162168
]
163169
}
164170
}
@@ -179,6 +185,7 @@ type SocialLinkIcon =
179185
| 'slack'
180186
| 'twitter'
181187
| 'youtube'
188+
| { svg: string }
182189
```
183190
184191
## footer

0 commit comments

Comments
 (0)