From 291444e12ee5b64445175a5bc540d7698c2cd1ca Mon Sep 17 00:00:00 2001 From: ntnyq Date: Mon, 6 Jan 2025 02:38:04 +0800 Subject: [PATCH] feat: add new network `pinterest` --- docs/.vuepress/config.ts | 40 +++++++++++++++++++--------------------- src/shared/constants.ts | 7 +++++++ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index cd8d2af..db39211 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -44,41 +44,39 @@ export default defineUserConfig({ plugins: [ shikiPlugin({ + // @keep-sorted langs: [ + 'bash', + 'css', + 'html', 'js', - 'ts', - 'md', + 'json', + 'jsonc', 'jsx', + 'md', + 'scss', + 'shell', + 'ts', 'tsx', - 'html', 'vue', - 'css', - 'scss', - 'json', - 'jsonc', - 'yml', 'yaml', - 'bash', - 'shell', + 'yml', ], theme: 'one-dark-pro', }), socialSharePlugin({ + // @keep-sorted networks: [ + 'email', + 'facebook', + 'linkedin', + 'pinterest', 'qq', + 'reddit', 'twitter', - 'weibo', - 'email', 'wechat', - 'linkedin', - { - name: 'pinterest', - type: 'popup', - icon: '/pinterest.png', - default: true, - sharer: - 'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title', - }, + 'weibo', + 'x', ], twitterUser: 'ntnyq', fallbackImage: '/hero.png', diff --git a/src/shared/constants.ts b/src/shared/constants.ts index e3ebd55..ec67b7c 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -42,6 +42,13 @@ export const BUILT_IN_NETWORKS = { sharer: 'https://www.linkedin.com/sharing/share-offsite/?url=@url', type: 'popup', }, + pinterest: { + color: '#bd081c', + icon: '', + type: 'popup', + sharer: + 'https://pinterest.com/pin/create/button/?url=@url&title=@title&media=@media&description=@description', + }, qq: { color: '#e9201f', icon: '',