diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index ae327e48..d0b08f92 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -46,4 +46,4 @@ jobs: cache: pnpm - run: pnpm install - run: pnpm build - - run: npx pkg-pr-new publish --compact --no-template --pnpm + - run: npx pkg-pr-new publish --compact --no-template --pnpm --packageManager=pnpm,npm,yarn diff --git a/__tests__/e2e/.vitepress/config.ts b/__tests__/e2e/.vitepress/config.ts index 7ec72c30..acd74892 100644 --- a/__tests__/e2e/.vitepress/config.ts +++ b/__tests__/e2e/.vitepress/config.ts @@ -65,6 +65,11 @@ const nav: DefaultTheme.Config['nav'] = [ ] } ] + }, + { + text: 'Active Match', + link: '/markdown-extensions/', + activeMatch: '^/home' } ] @@ -132,6 +137,44 @@ const sidebar: DefaultTheme.Config['sidebar'] = { link: '/markdown-extensions/foo' } ] + }, + { + text: 'Team & Sponsors', + items: [ + { + text: 'Doc Layout', + link: '/team-and-sponsors/doc' + }, + { + text: 'Page Layout', + link: '/team-and-sponsors/page' + }, + { + text: 'Home Layout', + link: '/team-and-sponsors/home' + }, + { + text: 'Home Layout (raw markdown)', + link: '/team-and-sponsors/home-no-markdown-styles' + } + ] + }, + { + text: 'Sidebar Hash', + items: [ + { + text: 'Overview', + link: '/sidebar-hash/' + }, + { + text: 'Section One', + link: '/sidebar-hash/#section-one' + }, + { + text: 'Section Two', + link: '/sidebar-hash/#section-two' + } + ] } ], '/multi-sidebar/': [ @@ -154,6 +197,7 @@ const sidebar: DefaultTheme.Config['sidebar'] = { export default defineConfig({ title: 'Example', description: 'An example app using VitePress.', + srcExclude: ['**/parts/**'], markdown: { image: { lazyLoad: true } }, diff --git a/__tests__/e2e/.vitepress/theme/components/ApiPreference.vue b/__tests__/e2e/.vitepress/theme/components/ApiPreference.vue index c286640b..0dfe61c8 100644 --- a/__tests__/e2e/.vitepress/theme/components/ApiPreference.vue +++ b/__tests__/e2e/.vitepress/theme/components/ApiPreference.vue @@ -5,12 +5,13 @@ const props = defineProps<{ options: string[] defaultOption: string screenMenu?: boolean + menu?: boolean }>() // reactivity isn't needed for props here const key = removeSpaces(`api-preference-${props.options.join('-')}`) -const name = key + (props.screenMenu ? '-screen-menu' : '') +const name = key + (props.screenMenu ? '-screen-menu' : props.menu ? '-menu' : '') const selected = useLocalStorage(key, () => props.defaultOption) @@ -25,8 +26,11 @@ function removeSpaces(str: string) {