Skip to content

Commit

Permalink
docs: group version links
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Dec 16, 2024
1 parent 0730dfb commit 8b9cac9
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import { shikiPlugin } from '@vuepress/plugin-shiki'
import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'
import { socialSharePlugin } from 'vuepress-plugin-social-share'
import { version } from '../../package.json'
import type { NavbarLinkOptions } from '@vuepress/theme-default'
import type { SocialShareNetworkData } from 'vuepress-plugin-social-share'

const packageName = 'vuepress-plugin-social-share'

const extendsNetworks: SocialShareNetworkData = {
pinterest: {
sharer: 'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title',
Expand All @@ -20,16 +24,22 @@ const extendsNetworks: SocialShareNetworkData = {
},
}

const VERSIONS: NavbarLinkOptions[] = [
{ text: `v${version} (current)`, link: '/' },
{ text: `Release Notes`, link: `https://github.com/ntnyq/${packageName}/releases` },
{ text: 'VuePress v1', link: 'https://social-share-v1.ntnyq.com' },
]

export default defineUserConfig({
title: 'vuepress-plugin-social-share',
title: packageName,

description: 'Social sharing plugin for VuePress',

bundler: viteBundler(),

theme: defaultTheme({
repo: 'ntnyq/vuepress-plugin-social-share',
docsRepo: 'ntnyq/vuepress-plugin-social-share',
repo: `ntnyq/${packageName}`,
docsRepo: `ntnyq/${packageName}`,
docsDir: 'docs',
docsBranch: 'next',
editLink: true,
Expand All @@ -39,10 +49,9 @@ export default defineUserConfig({
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Demo', link: '/demo/' },
{ text: 'VuePress v1', link: 'https://social-share-v1.ntnyq.com' },
{
text: 'Changelog',
link: 'https://github.com/ntnyq/vuepress-plugin-social-share/releases',
text: `v${version}`,
children: VERSIONS,
},
],

Expand Down

0 comments on commit 8b9cac9

Please sign in to comment.