Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/vitepress
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0-beta.7
Choose a base ref
...
head repository: vuejs/vitepress
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.0-rc.4
Choose a head ref
Loading
Showing with 1,583 additions and 902 deletions.
  1. +1 −1 .github/workflows/test.yml
  2. +60 −0 CHANGELOG.md
  3. +1 −1 __tests__/e2e/frontmatter/multiple-levels-outline.md
  4. +24 −10 __tests__/unit/client/theme-default/support/sidebar.test.ts
  5. +69 −108 docs/.vitepress/config.ts
  6. +1 −1 docs/guide/deploy.md
  7. +7 −1 docs/guide/getting-started.md
  8. +24 −0 docs/index.md
  9. BIN docs/public/vitepress-logo-large.webp
  10. +1 −0 docs/public/vitepress-logo-mini.svg
  11. BIN docs/public/vitepress-og.jpg
  12. +19 −19 docs/reference/cli.md
  13. +1 −1 docs/reference/default-theme-last-updated.md
  14. +24 −0 docs/reference/default-theme-layout.md
  15. +82 −17 docs/reference/site-config.md
  16. +1 −1 netlify.toml
  17. +16 −16 package.json
  18. +563 −342 pnpm-lock.yaml
  19. +1 −21 rollup.config.ts
  20. +14 −9 src/client/app/components/Content.ts
  21. +31 −10 src/client/app/composables/codeGroups.ts
  22. +1 −1 src/client/app/index.ts
  23. +32 −29 src/client/app/router.ts
  24. +1 −1 src/client/app/theme.ts
  25. +16 −7 src/client/theme-default/NotFound.vue
  26. +22 −12 src/client/theme-default/components/VPBadge.vue
  27. +5 −0 src/client/theme-default/components/VPContent.vue
  28. +9 −8 src/client/theme-default/components/VPDocOutlineDropdown.vue
  29. +3 −3 src/client/theme-default/components/VPDocOutlineItem.vue
  30. +2 −4 src/client/theme-default/components/VPFeature.vue
  31. +7 −1 src/client/theme-default/components/VPFlyout.vue
  32. +1 −5 src/client/theme-default/components/VPImage.vue
  33. +28 −14 src/client/theme-default/components/VPLocalNavOutlineDropdown.vue
  34. +10 −8 src/client/theme-default/components/VPLocalSearchBox.vue
  35. +14 −9 src/client/theme-default/components/VPNavBar.vue
  36. +1 −1 src/client/theme-default/components/VPNavBarMenuLink.vue
  37. +1 −0 src/client/theme-default/components/VPNavBarSearchButton.vue
  38. +1 −1 src/client/theme-default/components/VPNavBarTitle.vue
  39. +6 −0 src/client/theme-default/components/VPSidebarItem.vue
  40. +6 −2 src/client/theme-default/composables/outline.ts
  41. +6 −2 src/client/theme-default/composables/prev-next.ts
  42. +26 −15 src/client/theme-default/composables/sidebar.ts
  43. +4 −1 src/client/theme-default/styles/components/custom-block.css
  44. +9 −3 src/client/theme-default/styles/components/vp-code-group.css
  45. +6 −15 src/client/theme-default/styles/components/vp-doc.css
  46. +122 −70 src/client/theme-default/styles/vars.css
  47. +32 −21 src/client/theme-default/support/sidebar.ts
  48. +2 −5 src/node/alias.ts
  49. +9 −5 src/node/build/build.ts
  50. +3 −4 src/node/build/buildMPAClient.ts
  51. +18 −13 src/node/build/bundle.ts
  52. +47 −10 src/node/build/generateSitemap.ts
  53. +8 −9 src/node/build/render.ts
  54. +3 −2 src/node/config.ts
  55. +1 −1 src/node/contentLoader.ts
  56. +33 −30 src/node/init/init.ts
  57. +6 −1 src/node/markdown/markdown.ts
  58. +15 −6 src/node/markdown/plugins/containers.ts
  59. +13 −4 src/node/markdown/plugins/preWrapper.ts
  60. +5 −6 src/node/plugin.ts
  61. +2 −2 src/node/plugins/rewritesPlugin.ts
  62. +12 −3 src/node/plugins/staticDataPlugin.ts
  63. +2 −1 src/node/server.ts
  64. +7 −2 src/node/siteConfig.ts
  65. +1 −1 src/node/tsconfig.json
  66. +5 −0 src/node/utils/fnSerialize.ts
  67. +2 −0 src/node/utils/getGitTimestamp.ts
  68. +2 −2 theme-without-fonts.d.ts
  69. +70 −3 types/default-theme.d.ts
  70. +6 −1 types/shared.d.ts
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
node_version: [16, 18, 20]
node_version: [18, 20]

steps:
- name: Checkout
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
# [1.0.0-rc.4](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2023-08-08)

### Bug Fixes

- **cli:** generate mjs file on init if `"type": "module"` is not present ([23d7511](https://github.com/vuejs/vitepress/commit/23d751165f6def6fa6b3a5d7efd89b993a2780d8))
- **theme:** language menu undefined text ([#2755](https://github.com/vuejs/vitepress/issues/2755)) ([c9d4655](https://github.com/vuejs/vitepress/commit/c9d465587a3b2188ff9922483a15d7096e6a3e6c))

# [1.0.0-rc.3](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2023-08-08)

### Bug Fixes

- **regression/theme:** fix sidebar collapsing ([#2753](https://github.com/vuejs/vitepress/issues/2753)) ([9a4ee07](https://github.com/vuejs/vitepress/commit/9a4ee07260191adeb4c3810d95b044439609525c))

# [1.0.0-rc.1](https://github.com/vuejs/vitepress/compare/v1.0.0-beta.7...v1.0.0-rc.1) (2023-08-08)

### Bug Fixes

- `createContentLoader` generates invalid url when `base` is set ([#2714](https://github.com/vuejs/vitepress/issues/2714)) ([0f38eb4](https://github.com/vuejs/vitepress/commit/0f38eb440492f3a486517714976fbfe6dfb30a09))
- **build:** make outDir from cli work properly ([17378c0](https://github.com/vuejs/vitepress/commit/17378c064f3e6f166ce180f8d7eeced2f1cc4224)), closes [#2716](https://github.com/vuejs/vitepress/issues/2716)
- **build:** nested rewrites not working properly ([0f421d7](https://github.com/vuejs/vitepress/commit/0f421d72221495b8ef14195db3e3df9297ebc6ff))
- **client:** handle empty hash in links ([#2738](https://github.com/vuejs/vitepress/issues/2738)) ([c6c983e](https://github.com/vuejs/vitepress/commit/c6c983ed73a019027b452b3eaf0ee4b502d38818))
- fix sitemap path resolution ([481a5e3](https://github.com/vuejs/vitepress/commit/481a5e3cb55c6fda2c318180cfa0532ed34e4fc5)), closes [#2749](https://github.com/vuejs/vitepress/issues/2749)
- **theme:** align max-width media queries ([d31051a](https://github.com/vuejs/vitepress/commit/d31051a05106f97924be3cdb3919f24acc232b59))
- **theme:** allow using h1 headings in outline ([e3f8fc7](https://github.com/vuejs/vitepress/commit/e3f8fc7972f5506cd9def08ad13c62141737318f)), closes [#1529](https://github.com/vuejs/vitepress/issues/1529)
- **theme:** close dropdown menus after an item is clicked ([#2380](https://github.com/vuejs/vitepress/issues/2380)) ([e54eea3](https://github.com/vuejs/vitepress/commit/e54eea3da0de640e7b343381bddf9a439d638954))
- **theme:** don't reset scroll position on changing tab in code groups ([039798a](https://github.com/vuejs/vitepress/commit/039798a8c14a8c455e1187c5584c7f518c40f66a)), closes [#2732](https://github.com/vuejs/vitepress/issues/2732) [#2362](https://github.com/vuejs/vitepress/issues/2362)
- **theme:** dont show transparent navbar other than home ([#2742](https://github.com/vuejs/vitepress/issues/2742)) ([1d6254b](https://github.com/vuejs/vitepress/commit/1d6254b615b48ceef85267045e8fce976a7eafd5))
- **theme:** hide outline marker on scroll to top ([81e7405](https://github.com/vuejs/vitepress/commit/81e7405e193e832442db9aedb50ed3dc741e92ed))
- **theme:** outline marker flicks when navigating towards above ([e8ebf1b](https://github.com/vuejs/vitepress/commit/e8ebf1b0483e025b7d3bc3ea6eb3fa02d4acac93)), closes [#2665](https://github.com/vuejs/vitepress/issues/2665) [#2676](https://github.com/vuejs/vitepress/issues/2676)
- **theme:** override docsearch button bg ([063b0e5](https://github.com/vuejs/vitepress/commit/063b0e520a0b34db934371f56ddba212ceb3ba4c)), closes [#2735](https://github.com/vuejs/vitepress/issues/2735)
- **theme:** respect feature icon dimensions set from frontmatter ([93823a8](https://github.com/vuejs/vitepress/commit/93823a8566df22c57cb4fbc81fa65c34222ece5e)), closes [#1886](https://github.com/vuejs/vitepress/issues/1886)
- **theme:** scroll code group tab into view on selection ([1a6efba](https://github.com/vuejs/vitepress/commit/1a6efbae8e13eb6612aacdb8d384554e72e5f562)), closes [#2355](https://github.com/vuejs/vitepress/issues/2355)
- **theme:** update sidebar active link status on hash change ([#2736](https://github.com/vuejs/vitepress/issues/2736)) ([3840eaa](https://github.com/vuejs/vitepress/commit/3840eaae163cc9307c8d8525ad03c59752443b2b))

### Features

- **theme:** final re-brand ([#2727](https://github.com/vuejs/vitepress/pull/2727)) ([c0d838b](https://github.com/vuejs/vitepress/commit/c0d838bda0121fc162d1e6a43324f75290bc1b72))
- allow html blocks inside code groups ([#2719](https://github.com/vuejs/vitepress/issues/2719)) ([7f0c18e](https://github.com/vuejs/vitepress/commit/7f0c18e01384d48380b64ba629229ec048f85453))
- **build:** add `markdown.preConfig` option ([ce85726](https://github.com/vuejs/vitepress/commit/ce85726c127d9478274126374df9c37ee8b31167)), closes [#1382](https://github.com/vuejs/vitepress/issues/1382)
- **build:** allow overriding vite config loading ([#2750](https://github.com/vuejs/vitepress/issues/2750)) ([1bed154](https://github.com/vuejs/vitepress/commit/1bed154612661ac3783558cf82a7e94832ee4ff8))
- **client:** allow customizing scrollOffset padding ([20b509c](https://github.com/vuejs/vitepress/commit/20b509c6e1d957c73be75da27635b23de42781d4)), closes [#2739](https://github.com/vuejs/vitepress/issues/2739)
- **client:** allow overriding props on Content ([1179484](https://github.com/vuejs/vitepress/commit/11794844327c65bd6086b1237b0d6568cb32a4cb)), closes [#2712](https://github.com/vuejs/vitepress/issues/2712)
- i18n with sitemap ([#2708](https://github.com/vuejs/vitepress/issues/2708)) ([7778187](https://github.com/vuejs/vitepress/commit/7778187f2dc31554fa7541da9648235c994d4ae8))
- **search:** allow enabling detailed view by default ([4af5975](https://github.com/vuejs/vitepress/commit/4af597582cd8ae565e22c912f26f67123babcd61)), closes [#2690](https://github.com/vuejs/vitepress/issues/2690)
- **theme:** allow adding custom layouts ([f4a5c43](https://github.com/vuejs/vitepress/commit/f4a5c43cb00d70143cefcd9dfd9ba536f120ffda)), closes [#2547](https://github.com/vuejs/vitepress/issues/2547)
- **theme:** allow customizing default theme's 404 page ([d7e2254](https://github.com/vuejs/vitepress/commit/d7e225473bd072119c3ce76317db2b723be74f81)), closes [#2715](https://github.com/vuejs/vitepress/issues/2715)
- **theme:** allow customizing prev/next text from config file ([09a4fdc](https://github.com/vuejs/vitepress/commit/09a4fdc9b844a3e1877045afc496282b988f6f6b)), closes [#1373](https://github.com/vuejs/vitepress/issues/1373)
- **theme:** allow overriding logo link ([2a7422b](https://github.com/vuejs/vitepress/commit/2a7422bbbf91b852e27525d64627e9cff6eff294)), closes [#1683](https://github.com/vuejs/vitepress/issues/1683)
- **theme:** allow passing html in nav links ([69251b7](https://github.com/vuejs/vitepress/commit/69251b7484d8e4591841c32dd2f5a0179859cf14)), closes [#1652](https://github.com/vuejs/vitepress/issues/1652)
- **theme:** allow setting base path in sidebar items ([#2734](https://github.com/vuejs/vitepress/issues/2734)) ([52884d9](https://github.com/vuejs/vitepress/commit/52884d9d4b3ad294f4c4fcab637c4e07c80dde3a))

### Reverts

- [#2689](https://github.com/vuejs/vitepress/issues/2689) ([#2722](https://github.com/vuejs/vitepress/issues/2722)) ([a56d608](https://github.com/vuejs/vitepress/commit/a56d608bec427ad51a9edb620d8fb01ebae29550))

### BREAKING CHANGES

- Node v18+ is now required to run VitePress.
- VitePress now only provides ESM API. Refer [#2703](https://github.com/vuejs/vitepress/issues/2703) for details.

# [1.0.0-beta.7](https://github.com/vuejs/vitepress/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-07-29)

### Bug Fixes
2 changes: 1 addition & 1 deletion __tests__/e2e/frontmatter/multiple-levels-outline.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Multiple Levels Outline
editLink: true
outline: 'deep'
outline: deep
---

# h1 - 1
34 changes: 24 additions & 10 deletions __tests__/unit/client/theme-default/support/sidebar.test.ts
Original file line number Diff line number Diff line change
@@ -28,15 +28,19 @@ describe('client/theme-default/support/sidebar', () => {
}

test('gets `/` sidebar', () => {
expect(getSidebar(normalSidebar, '/')).toBe(root)
expect(getSidebar(normalSidebar, '/')).toStrictEqual(root)
})

test('gets `/multi-sidebar/` sidebar', () => {
expect(getSidebar(normalSidebar, '/multi-sidebar/')).toBe(another)
expect(getSidebar(normalSidebar, '/multi-sidebar/')).toStrictEqual(
another
)
})

test('gets `/` sidebar again', () => {
expect(getSidebar(normalSidebar, '/some-entry.html')).toBe(root)
expect(getSidebar(normalSidebar, '/some-entry.html')).toStrictEqual(
root
)
})
})

@@ -47,15 +51,19 @@ describe('client/theme-default/support/sidebar', () => {
}

test('gets `/` sidebar', () => {
expect(getSidebar(reversedSidebar, '/')).toBe(root)
expect(getSidebar(reversedSidebar, '/')).toStrictEqual(root)
})

test('gets `/multi-sidebar/` sidebar', () => {
expect(getSidebar(reversedSidebar, '/multi-sidebar/')).toBe(another)
expect(getSidebar(reversedSidebar, '/multi-sidebar/')).toStrictEqual(
another
)
})

test('gets `/` sidebar again', () => {
expect(getSidebar(reversedSidebar, '/some-entry.html')).toBe(root)
expect(getSidebar(reversedSidebar, '/some-entry.html')).toStrictEqual(
root
)
})
})

@@ -74,19 +82,25 @@ describe('client/theme-default/support/sidebar', () => {
}

test('gets `/` sidebar', () => {
expect(getSidebar(nestedSidebar, '/')).toBe(root)
expect(getSidebar(nestedSidebar, '/')).toStrictEqual(root)
})

test('gets `/multi-sidebar/` sidebar', () => {
expect(getSidebar(nestedSidebar, '/multi-sidebar/')).toBe(another)
expect(getSidebar(nestedSidebar, '/multi-sidebar/')).toStrictEqual(
another
)
})

test('gets `/multi-sidebar/nested/` sidebar', () => {
expect(getSidebar(nestedSidebar, '/multi-sidebar/nested/')).toBe(nested)
expect(
getSidebar(nestedSidebar, '/multi-sidebar/nested/')
).toStrictEqual(nested)
})

test('gets `/` sidebar again', () => {
expect(getSidebar(nestedSidebar, '/some-entry.html')).toBe(root)
expect(getSidebar(nestedSidebar, '/some-entry.html')).toStrictEqual(
root
)
})
})
})
Loading