diff --git a/.vscode/settings.json b/.vscode/settings.json
index d5f83e9..e340784 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -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",
diff --git a/docs/guide/README.md b/docs/guide/README.md
index abec886..5d044b5 100644
--- a/docs/guide/README.md
+++ b/docs/guide/README.md
@@ -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: '',
- },
- {
- name: 'twitter',
- color: {
- light: '#1786b1',
- dark: '#ff0',
- },
- },
-]
export default defineUserConfig({
plugins: [
@@ -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: '',
+ },
+ /**
+ * override built-in network
+ */
+ {
+ name: 'twitter',
+ color: {
+ light: '#1786b1',
+ dark: '#ff0',
+ },
+ },
],
twitterUser: 'ntnyq',
fallbackImage: '/social-share.png',