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: on demand social icons #4339

Merged
merged 7 commits into from
Nov 4, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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