Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Jan 5, 2025
1 parent ccba8dd commit 345770d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"javascriptreact",
"typescriptreact"
],
// required a .js extension for typescript import
"typescript.preferences.importModuleSpecifierEnding": "js",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"cSpell.words": [
"bumpp",
Expand Down
59 changes: 29 additions & 30 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,6 @@ For advanced usage.
```ts
import { defineUserConfig } from 'vuepress'
import { socialSharePlugin } from 'vuepress-plugin-social-share'
import type { SocialShareNetworkWithName } from 'vuepress-plugin-social-share'

const userDefinedNetworks: SocialShareNetworkWithName[] = [
{
name: 'pinterest',
sharer: 'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title',
type: 'popup',
icon: '/pinterest.png',
/**
* mark this network as default
*/
default: true,
},
{
name: 'linkedin',
sharer:
'https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description',
type: 'popup',
color: '#1786b1',
icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M910.336 0H113.664A114.005333 114.005333 0 0 0 0 113.664v796.672A114.005333 114.005333 0 0 0 113.664 1024h796.672A114.005333 114.005333 0 0 0 1024 910.336V113.664A114.005333 114.005333 0 0 0 910.336 0zM352.256 796.330667H207.189333V375.466667h145.066667z m-72.021333-477.866667a77.824 77.824 0 0 1-81.237334-74.069333A77.824 77.824 0 0 1 280.234667 170.666667a77.824 77.824 0 0 1 81.237333 73.728 77.824 77.824 0 0 1-81.237333 73.386666z m582.314666 477.866667H716.8v-227.669334c0-46.762667-18.432-93.525333-73.045333-93.525333a84.992 84.992 0 0 0-81.237334 94.549333v226.304h-140.629333V375.466667h141.653333v60.757333a155.989333 155.989333 0 0 1 136.533334-71.338667c60.416 0 163.498667 30.378667 163.498666 194.901334z" /></svg>',
},
{
name: 'twitter',
color: {
light: '#1786b1',
dark: '#ff0',
},
},
]

export default defineUserConfig({
plugins: [
Expand All @@ -83,7 +54,35 @@ export default defineUserConfig({
'linkedin',

// add user defined networks
userDefinedNetworks,
{
name: 'pinterest',
sharer:
'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title',
type: 'popup',
icon: '/pinterest.png',
/**
* mark this network as default
*/
default: true,
},
{
name: 'linkedin',
sharer:
'https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description',
type: 'popup',
color: '#1786b1',
icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M910.336 0H113.664A114.005333 114.005333 0 0 0 0 113.664v796.672A114.005333 114.005333 0 0 0 113.664 1024h796.672A114.005333 114.005333 0 0 0 1024 910.336V113.664A114.005333 114.005333 0 0 0 910.336 0zM352.256 796.330667H207.189333V375.466667h145.066667z m-72.021333-477.866667a77.824 77.824 0 0 1-81.237334-74.069333A77.824 77.824 0 0 1 280.234667 170.666667a77.824 77.824 0 0 1 81.237333 73.728 77.824 77.824 0 0 1-81.237333 73.386666z m582.314666 477.866667H716.8v-227.669334c0-46.762667-18.432-93.525333-73.045333-93.525333a84.992 84.992 0 0 0-81.237334 94.549333v226.304h-140.629333V375.466667h141.653333v60.757333a155.989333 155.989333 0 0 1 136.533334-71.338667c60.416 0 163.498667 30.378667 163.498666 194.901334z" /></svg>',
},
/**
* override built-in network
*/
{
name: 'twitter',
color: {
light: '#1786b1',
dark: '#ff0',
},
},
],
twitterUser: 'ntnyq',
fallbackImage: '/social-share.png',
Expand Down

0 comments on commit 345770d

Please sign in to comment.