Skip to content

Commit

Permalink
feat: on demand social icons (#4339)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Nov 4, 2024
1 parent 602ae7b commit 05f2f0d
Show file tree
Hide file tree
Showing 15 changed files with 170 additions and 146 deletions.
17 changes: 2 additions & 15 deletions docs/en/reference/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ You may define this option to show your social account links with icons in nav.
export default {
themeConfig: {
socialLinks: [
// You can add any icon from simple-icons (https://simpleicons.org/):
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' },
{ icon: 'twitter', link: '...' },
// You can also add custom icons by passing SVG as string:
Expand All @@ -246,24 +247,10 @@ export default {

```ts
interface SocialLink {
icon: SocialLinkIcon
icon: string | { svg: string }
link: string
ariaLabel?: string
}

type SocialLinkIcon =
| 'discord'
| 'facebook'
| 'github'
| 'instagram'
| 'linkedin'
| 'mastodon'
| 'npm'
| 'slack'
| 'twitter'
| 'x'
| 'youtube'
| { svg: string }
```

## footer
Expand Down
16 changes: 1 addition & 15 deletions docs/es/reference/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,24 +233,10 @@ export default {

```ts
interface SocialLink {
icon: SocialLinkIcon
icon: string | { svg: string }
link: string
ariaLabel?: string
}

type SocialLinkIcon =
| 'discord'
| 'facebook'
| 'github'
| 'instagram'
| 'linkedin'
| 'mastodon'
| 'npm'
| 'slack'
| 'twitter'
| 'x'
| 'youtube'
| { svg: string }
```

## footer
Expand Down
16 changes: 1 addition & 15 deletions docs/ko/reference/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,24 +246,10 @@ export default {

```ts
interface SocialLink {
icon: SocialLinkIcon
icon: string | { svg: string }
link: string
ariaLabel?: string
}

type SocialLinkIcon =
| 'discord'
| 'facebook'
| 'github'
| 'instagram'
| 'linkedin'
| 'mastodon'
| 'npm'
| 'slack'
| 'twitter'
| 'x'
| 'youtube'
| { svg: string }
```

## footer
Expand Down
16 changes: 1 addition & 15 deletions docs/pt/reference/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,24 +233,10 @@ export default {

```ts
interface SocialLink {
icon: SocialLinkIcon
icon: string | { svg: string }
link: string
ariaLabel?: string
}

type SocialLinkIcon =
| 'discord'
| 'facebook'
| 'github'
| 'instagram'
| 'linkedin'
| 'mastodon'
| 'npm'
| 'slack'
| 'twitter'
| 'x'
| 'youtube'
| { svg: string }
```

## footer
Expand Down
16 changes: 1 addition & 15 deletions docs/ru/reference/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,24 +233,10 @@ export default {

```ts
interface SocialLink {
icon: SocialLinkIcon
icon: string | { svg: string }
link: string
ariaLabel?: string
}

type SocialLinkIcon =
| 'discord'
| 'facebook'
| 'github'
| 'instagram'
| 'linkedin'
| 'mastodon'
| 'npm'
| 'slack'
| 'twitter'
| 'x'
| 'youtube'
| { svg: string }
```

## footer {#footer}
Expand Down
16 changes: 1 addition & 15 deletions docs/zh/reference/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,24 +233,10 @@ export default {

```ts
interface SocialLink {
icon: SocialLinkIcon
icon: string | { svg: string }
link: string
ariaLabel?: string
}

type SocialLinkIcon =
| 'discord'
| 'facebook'
| 'github'
| 'instagram'
| 'linkedin'
| 'mastodon'
| 'npm'
| 'slack'
| 'twitter'
| 'x'
| 'youtube'
| { svg: string }
```

## footer
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"dependencies": {
"@docsearch/css": "^3.6.2",
"@docsearch/js": "^3.6.2",
"@iconify-json/simple-icons": "^1.2.10",
"@shikijs/core": "^1.22.2",
"@shikijs/transformers": "^1.22.2",
"@shikijs/types": "^1.22.2",
Expand All @@ -118,6 +119,7 @@
},
"devDependencies": {
"@clack/prompts": "^0.7.0",
"@iconify/utils": "^2.1.33",
"@mdit-vue/plugin-component": "^2.1.3",
"@mdit-vue/plugin-frontmatter": "^2.1.3",
"@mdit-vue/plugin-headers": "^2.1.3",
Expand Down
Loading

0 comments on commit 05f2f0d

Please sign in to comment.