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: vuepress/ecosystem
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0-rc.80
Choose a base ref
...
head repository: vuepress/ecosystem
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.0-rc.81
Choose a head ref
  • 20 commits
  • 225 files changed
  • 2 contributors

Commits on Feb 25, 2025

  1. fix(helper): fix a11y issue with normalize

    Mister-Hope committed Feb 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    81d451b View commit details
  2. feat(plugin-sitemap): respect rem in template

    Mister-Hope committed Feb 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3958f58 View commit details
  3. fix(plugin-revealjs): improve a11y

    Mister-Hope committed Feb 25, 2025
    Copy the full SHA
    9e917b7 View commit details
  4. fix(highlighter-helper): fix a11y issue

    Mister-Hope committed Feb 25, 2025
    Copy the full SHA
    a320057 View commit details

Commits on Feb 26, 2025

  1. fix(plugin-markdown-hint): fix missing env in title inline rendering,

    close #380 (#381)
    pengzhanbo authored Feb 26, 2025
    Copy the full SHA
    4270cd9 View commit details

Commits on Feb 27, 2025

  1. feat(plugin-notice): add markdown format support for notice content, c…

    …lose #376 (#382)
    pengzhanbo authored Feb 27, 2025
    Copy the full SHA
    7b7068e View commit details
  2. Copy the full SHA
    cb18654 View commit details
  3. feat: prefer rem unit

    Mister-Hope committed Feb 27, 2025
    Copy the full SHA
    869e08c View commit details
  4. fix(plugin-redirect): fix checkbox size

    Mister-Hope committed Feb 27, 2025
    Copy the full SHA
    adb8407 View commit details
  5. docs: add colors for code tabs

    Mister-Hope committed Feb 27, 2025
    Copy the full SHA
    6588b3f View commit details

Commits on Feb 28, 2025

  1. refactor(plugin-slimsearch): tweaks

    Mister-Hope committed Feb 28, 2025
    Copy the full SHA
    ff43cef View commit details
  2. fix(plugin-medium-zoom): fix onContentUpdate usage

    Mister-Hope committed Feb 28, 2025
    Copy the full SHA
    7b753df View commit details
  3. Copy the full SHA
    a567510 View commit details
  4. refactor(plugin-slimsearch): avoid inject/provide

    Mister-Hope committed Feb 28, 2025
    Copy the full SHA
    52ac5b7 View commit details
  5. style: fix linter

    Mister-Hope committed Feb 28, 2025
    Copy the full SHA
    d578dfc View commit details

Commits on Mar 4, 2025

  1. feat: add codeBlockTitle option support for highlighter, close #379 (

    pengzhanbo authored Mar 4, 2025
    Copy the full SHA
    7535e36 View commit details
  2. build: bump deps (#387)

    Mister-Hope authored Mar 4, 2025
    Copy the full SHA
    c53b423 View commit details
  3. feat: improve rtl support (#388)

    Mister-Hope authored Mar 4, 2025
    Copy the full SHA
    c2a95d4 View commit details
  4. feat(plugin-git): add built-in component <Contributors/> `<Changelo…

    …g/>`, close #375 (#384)
    pengzhanbo authored Mar 4, 2025
    Copy the full SHA
    56cece7 View commit details
  5. build: publish v2.0.0-rc.81

    Mister-Hope committed Mar 4, 2025
    Copy the full SHA
    a21397a View commit details
Showing with 3,499 additions and 1,645 deletions.
  1. +0 −2 .stylelintrc.yml
  2. +21 −0 CHANGELOG.md
  3. +34 −0 docs/.vuepress/components/ToggleRTLButton.vue
  4. +7 −7 docs/.vuepress/components/VPNavbarDropdown.vue
  5. +11 −8 docs/.vuepress/components/VPSidebarItem.vue
  6. BIN docs/.vuepress/public/images/git/changelog-en.png
  7. BIN docs/.vuepress/public/images/git/changelog-zh.png
  8. BIN docs/.vuepress/public/images/git/contributor-en.png
  9. BIN docs/.vuepress/public/images/git/contributor-zh.png
  10. +10 −0 docs/.vuepress/styles/index.scss
  11. +1 −1 docs/package.json
  12. +89 −0 docs/plugins/development/git.md
  13. +8 −0 docs/plugins/development/rtl.md
  14. +36 −3 docs/plugins/features/notice.md
  15. +30 −0 docs/plugins/markdown/prismjs.md
  16. +30 −0 docs/plugins/markdown/shiki.md
  17. +85 −0 docs/zh/plugins/development/git.md
  18. +8 −0 docs/zh/plugins/development/rtl.md
  19. +34 −2 docs/zh/plugins/features/notice.md
  20. +30 −0 docs/zh/plugins/markdown/prismjs.md
  21. +30 −0 docs/zh/plugins/markdown/shiki.md
  22. +13 −0 e2e/docs/.vuepress/config.ts
  23. +1 −1 e2e/docs/.vuepress/layouts/Category.vue
  24. +1 −1 e2e/docs/.vuepress/layouts/Tag.vue
  25. +1 −0 e2e/docs/.vuepress/notice.md
  26. +1 −0 e2e/docs/notice/file.md
  27. +1 −1 e2e/package.json
  28. +15 −0 e2e/tests/plugin-notice/notice.spec.ts
  29. +1 −1 lerna.json
  30. +12 −12 package.json
  31. +4 −0 plugins/analytics/plugin-baidu-analytics/CHANGELOG.md
  32. +1 −1 plugins/analytics/plugin-baidu-analytics/package.json
  33. +4 −0 plugins/analytics/plugin-umami-analytics/CHANGELOG.md
  34. +1 −1 plugins/analytics/plugin-umami-analytics/package.json
  35. +4 −0 plugins/blog/plugin-blog/CHANGELOG.md
  36. +1 −1 plugins/blog/plugin-blog/package.json
  37. +4 −0 plugins/blog/plugin-comment/CHANGELOG.md
  38. +1 −1 plugins/blog/plugin-comment/package.json
  39. +6 −0 plugins/blog/plugin-feed/CHANGELOG.md
  40. +1 −1 plugins/blog/plugin-feed/package.json
  41. +12 −16 plugins/blog/plugin-feed/templates/atom.xsl
  42. +6 −0 plugins/development/plugin-git/CHANGELOG.md
  43. +8 −3 plugins/development/plugin-git/package.json
  44. +6 −3 plugins/development/plugin-git/rollup.config.ts
  45. +143 −0 plugins/development/plugin-git/src/client/components/Changelog.ts
  46. +74 −0 plugins/development/plugin-git/src/client/components/Contributors.ts
  47. +26 −0 plugins/development/plugin-git/src/client/components/VPHeader.ts
  48. +3 −0 plugins/development/plugin-git/src/client/components/index.ts
  49. +1 −0 plugins/development/plugin-git/src/client/composables/index.ts
  50. +11 −0 plugins/development/plugin-git/src/client/composables/useGitLocales.ts
  51. +3 −0 plugins/development/plugin-git/src/client/index.ts
  52. +155 −0 plugins/development/plugin-git/src/client/styles/changelog.scss
  53. +30 −0 plugins/development/plugin-git/src/client/styles/contributors.scss
  54. +5 −0 plugins/development/plugin-git/src/client/styles/vars.css
  55. +16 −4 plugins/development/plugin-git/src/node/gitPlugin.ts
  56. +1 −0 plugins/development/plugin-git/src/node/index.ts
  57. +205 −0 plugins/development/plugin-git/src/node/locales.ts
  58. +5 −41 plugins/development/plugin-git/src/node/options.ts
  59. +2 −5 plugins/development/plugin-git/src/node/resolveChangelog.ts
  60. +4 −6 plugins/development/plugin-git/src/node/resolveContributors.ts
  61. +1 −76 plugins/development/plugin-git/src/node/typings.ts
  62. +2 −1 plugins/development/plugin-git/src/node/utils/getCommits.ts
  63. +147 −0 plugins/development/plugin-git/src/shared/index.ts
  64. +2 −1 plugins/development/plugin-git/tsconfig.build.json
  65. +4 −0 plugins/development/plugin-palette/CHANGELOG.md
  66. +1 −1 plugins/development/plugin-palette/package.json
  67. +4 −0 plugins/development/plugin-reading-time/CHANGELOG.md
  68. +1 −1 plugins/development/plugin-reading-time/package.json
  69. +4 −0 plugins/development/plugin-rtl/CHANGELOG.md
  70. +1 −1 plugins/development/plugin-rtl/package.json
  71. +4 −0 plugins/development/plugin-sass-palette/CHANGELOG.md
  72. +1 −1 plugins/development/plugin-sass-palette/package.json
  73. +4 −0 plugins/development/plugin-toc/CHANGELOG.md
  74. +1 −1 plugins/development/plugin-toc/package.json
  75. +6 −0 plugins/features/plugin-back-to-top/CHANGELOG.md
  76. +1 −1 plugins/features/plugin-back-to-top/package.json
  77. +1 −1 plugins/features/plugin-back-to-top/src/client/styles/back-to-top.scss
  78. +7 −0 plugins/features/plugin-catalog/CHANGELOG.md
  79. +1 −1 plugins/features/plugin-catalog/package.json
  80. +11 −6 plugins/features/plugin-catalog/src/client/styles/catalog.scss
  81. +4 −0 plugins/features/plugin-copy-code/CHANGELOG.md
  82. +1 −1 plugins/features/plugin-copy-code/package.json
  83. +4 −0 plugins/features/plugin-copyright/CHANGELOG.md
  84. +1 −1 plugins/features/plugin-copyright/package.json
  85. +4 −0 plugins/features/plugin-icon/CHANGELOG.md
  86. +1 −1 plugins/features/plugin-icon/package.json
  87. +6 −0 plugins/features/plugin-medium-zoom/CHANGELOG.md
  88. +1 −1 plugins/features/plugin-medium-zoom/package.json
  89. +6 −2 plugins/features/plugin-medium-zoom/src/client/config.ts
  90. +8 −0 plugins/features/plugin-notice/CHANGELOG.md
  91. +2 −1 plugins/features/plugin-notice/package.json
  92. +4 −20 plugins/features/plugin-notice/src/client/components/Notice.ts
  93. +1 −0 plugins/features/plugin-notice/src/client/composables/index.ts
  94. +20 −0 plugins/features/plugin-notice/src/client/composables/useNoticeOptions.ts
  95. +1 −4 plugins/features/plugin-notice/src/client/config.ts
  96. +1 −0 plugins/features/plugin-notice/src/client/index.ts
  97. +5 −0 plugins/features/plugin-notice/src/client/noticeOptions.d.ts
  98. +5 −1 plugins/features/plugin-notice/src/client/styles/notice.scss
  99. +1 −1 plugins/features/plugin-notice/src/node/getNoticeOptions.ts
  100. +12 −5 plugins/features/plugin-notice/src/node/noticePlugin.ts
  101. +128 −0 plugins/features/plugin-notice/src/node/prepareNoticeOptions.ts
  102. +26 −3 plugins/features/plugin-notice/src/shared/notice.ts
  103. +4 −1 plugins/features/plugin-notice/tsconfig.build.json
  104. +4 −0 plugins/features/plugin-nprogress/CHANGELOG.md
  105. +1 −1 plugins/features/plugin-nprogress/package.json
  106. +4 −0 plugins/features/plugin-photo-swipe/CHANGELOG.md
  107. +1 −1 plugins/features/plugin-photo-swipe/package.json
  108. +4 −0 plugins/features/plugin-watermark/CHANGELOG.md
  109. +1 −1 plugins/features/plugin-watermark/package.json
  110. +4 −0 plugins/markdown/plugin-append-date/CHANGELOG.md
  111. +1 −1 plugins/markdown/plugin-append-date/package.json
  112. +4 −0 plugins/markdown/plugin-links-check/CHANGELOG.md
  113. +1 −1 plugins/markdown/plugin-links-check/package.json
  114. +4 −0 plugins/markdown/plugin-markdown-ext/CHANGELOG.md
  115. +1 −1 plugins/markdown/plugin-markdown-ext/package.json
  116. +6 −0 plugins/markdown/plugin-markdown-hint/CHANGELOG.md
  117. +1 −1 plugins/markdown/plugin-markdown-hint/package.json
  118. +3 −3 plugins/markdown/plugin-markdown-hint/src/node/hint.ts
  119. +4 −0 plugins/markdown/plugin-markdown-image/CHANGELOG.md
  120. +1 −1 plugins/markdown/plugin-markdown-image/package.json
  121. +4 −0 plugins/markdown/plugin-markdown-include/CHANGELOG.md
  122. +1 −1 plugins/markdown/plugin-markdown-include/package.json
  123. +4 −0 plugins/markdown/plugin-markdown-math/CHANGELOG.md
  124. +1 −1 plugins/markdown/plugin-markdown-math/package.json
  125. +4 −0 plugins/markdown/plugin-markdown-stylize/CHANGELOG.md
  126. +1 −1 plugins/markdown/plugin-markdown-stylize/package.json
  127. +4 −0 plugins/markdown/plugin-markdown-tab/CHANGELOG.md
  128. +1 −1 plugins/markdown/plugin-markdown-tab/package.json
  129. +6 −0 plugins/markdown/plugin-prismjs/CHANGELOG.md
  130. +1 −1 plugins/markdown/plugin-prismjs/package.json
  131. +2 −5 plugins/markdown/plugin-prismjs/src/node/markdown/preWrapperPlugin.ts
  132. +3 −1 plugins/markdown/plugin-prismjs/src/node/options.ts
  133. +7 −0 plugins/markdown/plugin-prismjs/src/node/prepareClientConfigFile.ts
  134. +11 −1 plugins/markdown/plugin-prismjs/src/node/prismjsPlugin.ts
  135. +0 −1 plugins/markdown/plugin-prismjs/src/node/utils/index.ts
  136. +157 −107 plugins/markdown/plugin-prismjs/tests/__snapshots__/prismjs-preWrapper.spec.ts.snap
  137. +6 −0 plugins/markdown/plugin-prismjs/tests/prismjs-preWrapper.spec.ts
  138. +11 −0 plugins/markdown/plugin-revealjs/CHANGELOG.md
  139. +1 −1 plugins/markdown/plugin-revealjs/package.json
  140. +4 −3 plugins/markdown/plugin-revealjs/src/client/styles/_normalize.scss
  141. +7 −7 plugins/markdown/plugin-revealjs/src/client/styles/slide-page.scss
  142. +0 −2 plugins/markdown/plugin-revealjs/src/client/styles/themes/auto.scss
  143. +0 −1 plugins/markdown/plugin-revealjs/src/client/styles/themes/black.scss
  144. +2 −2 plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_vars.scss
  145. +0 −1 plugins/markdown/plugin-revealjs/src/client/styles/themes/white.scss
  146. +6 −0 plugins/markdown/plugin-shiki/CHANGELOG.md
  147. +3 −3 plugins/markdown/plugin-shiki/package.json
  148. +2 −4 plugins/markdown/plugin-shiki/src/node/markdown/preWrapperPlugin.ts
  149. +3 −1 plugins/markdown/plugin-shiki/src/node/options.ts
  150. +7 −0 plugins/markdown/plugin-shiki/src/node/prepareClientConfigFile.ts
  151. +8 −1 plugins/markdown/plugin-shiki/src/node/shikiPlugin.ts
  152. +0 −10 plugins/markdown/plugin-shiki/src/node/utils.ts
  153. +153 −103 plugins/markdown/plugin-shiki/tests/__snapshots__/shiki-preWrapper.spec.ts.snap
  154. +6 −0 plugins/markdown/plugin-shiki/tests/shiki-preWrapper.spec.ts
  155. +6 −0 plugins/pwa/plugin-pwa/CHANGELOG.md
  156. +2 −2 plugins/pwa/plugin-pwa/package.json
  157. +1 −1 plugins/pwa/plugin-pwa/src/client/components/PwaInstall.ts
  158. +8 −5 plugins/pwa/plugin-pwa/src/client/styles/modal.scss
  159. +4 −0 plugins/search/plugin-docsearch/CHANGELOG.md
  160. +1 −1 plugins/search/plugin-docsearch/package.json
  161. +6 −0 plugins/search/plugin-search/CHANGELOG.md
  162. +1 −1 plugins/search/plugin-search/package.json
  163. +7 −6 plugins/search/plugin-search/src/client/styles/search.scss
  164. +6 −0 plugins/search/plugin-slimsearch/CHANGELOG.md
  165. +1 −1 plugins/search/plugin-slimsearch/package.json
  166. +4 −4 plugins/search/plugin-slimsearch/src/client/components/SearchBox.ts
  167. +35 −35 plugins/search/plugin-slimsearch/src/client/components/SearchModal.ts
  168. +1 −1 plugins/search/plugin-slimsearch/src/client/composables/index.ts
  169. +0 −14 plugins/search/plugin-slimsearch/src/client/composables/setup.ts
  170. +9 −0 plugins/search/plugin-slimsearch/src/client/composables/useActiveState.ts
  171. +0 −4 plugins/search/plugin-slimsearch/src/client/config.ts
  172. +4 −4 plugins/search/plugin-slimsearch/src/client/styles/search-modal.scss
  173. +4 −0 plugins/seo/plugin-seo/CHANGELOG.md
  174. +1 −1 plugins/seo/plugin-seo/package.json
  175. +7 −0 plugins/seo/plugin-sitemap/CHANGELOG.md
  176. +1 −1 plugins/seo/plugin-sitemap/package.json
  177. +8 −12 plugins/seo/plugin-sitemap/templates/sitemap.xsl
  178. +10 −0 plugins/tools/plugin-redirect/CHANGELOG.md
  179. +1 −1 plugins/tools/plugin-redirect/package.json
  180. +5 −3 plugins/tools/plugin-redirect/src/client/styles/redirect-modal.scss
  181. +950 −939 pnpm-lock.yaml
  182. +8 −0 themes/theme-default/CHANGELOG.md
  183. +1 −1 themes/theme-default/package.json
  184. +1 −2 themes/theme-default/src/client/components/VPHome.vue
  185. +3 −3 themes/theme-default/src/client/components/VPNavbar.vue
  186. +1 −1 themes/theme-default/src/client/components/VPNavbarBrand.vue
  187. +7 −10 themes/theme-default/src/client/components/VPNavbarDropdown.vue
  188. +3 −3 themes/theme-default/src/client/components/VPNavbarItems.vue
  189. +3 −3 themes/theme-default/src/client/components/VPPage.vue
  190. +6 −7 themes/theme-default/src/client/components/VPPageMeta.vue
  191. +2 −4 themes/theme-default/src/client/components/VPPageNav.vue
  192. +12 −5 themes/theme-default/src/client/components/VPSidebar.vue
  193. +11 −8 themes/theme-default/src/client/components/VPSidebarItem.vue
  194. +1 −1 themes/theme-default/src/client/components/VPToggleColorModeButton.vue
  195. +1 −1 themes/theme-default/src/client/components/VPToggleSidebarButton.vue
  196. +3 −3 themes/theme-default/src/client/components/global/Badge.vue
  197. +1 −1 themes/theme-default/src/client/layouts/Layout.vue
  198. +8 −0 themes/theme-default/src/client/styles/arrow.scss
  199. +1 −2 themes/theme-default/src/client/styles/code-group.scss
  200. +1 −1 themes/theme-default/src/client/styles/external-link-icon.scss
  201. +2 −1 themes/theme-default/src/node/defaultTheme.ts
  202. +2 −1 themes/theme-default/src/node/typings.ts
  203. +5 −5 themes/theme-default/tests/navbar.spec-d.ts
  204. +6 −0 tools/create-vuepress/CHANGELOG.md
  205. +1 −1 tools/create-vuepress/package.json
  206. +1 −1 tools/create-vuepress/template/blog/.vuepress/layouts/Category.vue
  207. +1 −1 tools/create-vuepress/template/blog/.vuepress/layouts/Tag.vue
  208. +11 −0 tools/helper/CHANGELOG.md
  209. +1 −2 tools/helper/package.json
  210. +2 −3 tools/helper/src/client/styles/normalize.scss
  211. +1 −1 tools/helper/tests/__fixtures__/package-manager/config/pnpm/package.json
  212. +11 −0 tools/highlighter-helper/CHANGELOG.md
  213. +1 −1 tools/highlighter-helper/package.json
  214. +2 −2 tools/highlighter-helper/src/client/styles/base.scss
  215. +49 −0 tools/highlighter-helper/src/client/styles/code-block-title.scss
  216. +1 −0 tools/highlighter-helper/src/client/styles/line-numbers.scss
  217. +2 −0 tools/highlighter-helper/src/node/codeBlockTitle/index.ts
  218. +13 −0 tools/highlighter-helper/src/node/codeBlockTitle/options.ts
  219. +41 −0 tools/highlighter-helper/src/node/codeBlockTitle/plugin.ts
  220. +2 −0 tools/highlighter-helper/src/node/index.ts
  221. +1 −0 tools/highlighter-helper/src/node/utils/index.ts
  222. +0 −3 {plugins/markdown/plugin-prismjs → tools/highlighter-helper}/src/node/utils/resolveAttr.ts
  223. +4 −0 tools/shiki-twoslash/CHANGELOG.md
  224. +5 −5 tools/shiki-twoslash/package.json
  225. +3 −0 tsconfig.json
2 changes: 0 additions & 2 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -14,8 +14,6 @@ rules:
declaration-block-no-redundant-longhand-properties: true
media-feature-range-notation: prefix
no-descending-specificity: null
# workaround for mixed-declarations
no-duplicate-selectors: null

overrides:
- files:
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,27 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Bug Fixes

- **helper:** fix a11y issue with normalize ([81d451b](https://github.com/vuepress/ecosystem/commit/81d451bdbe297397e082499b432e39e74d7e61ba))
- **highlighter-helper:** fix a11y issue ([a320057](https://github.com/vuepress/ecosystem/commit/a3200570d4396d209c5dde2e7d6e545fcb239d80))
- **plugin-markdown-hint:** fix missing `env` in title inline rendering, close [#380](https://github.com/vuepress/ecosystem/issues/380) ([#381](https://github.com/vuepress/ecosystem/issues/381)) ([4270cd9](https://github.com/vuepress/ecosystem/commit/4270cd9e7759eb13ab66a8ad71f6f4a685eae1cf))
- **plugin-medium-zoom:** fix onContentUpdate usage ([7b753df](https://github.com/vuepress/ecosystem/commit/7b753df386bd39f3a0c3122abcb01ee1365e7c24))
- **plugin-redirect:** fix checkbox size ([adb8407](https://github.com/vuepress/ecosystem/commit/adb8407c77ae3aaaa29933cb7912ae16993e8474))
- **plugin-revealjs:** improve a11y ([9e917b7](https://github.com/vuepress/ecosystem/commit/9e917b76d1f7edfd98e29a5fa52e0c998fb9e94c))

### Features

- add `codeBlockTitle` option support for highlighter, close [#379](https://github.com/vuepress/ecosystem/issues/379) ([#386](https://github.com/vuepress/ecosystem/issues/386)) ([7535e36](https://github.com/vuepress/ecosystem/commit/7535e36a6289891a004445873c34d0a9531636f0))
- improve rtl support ([#388](https://github.com/vuepress/ecosystem/issues/388)) ([c2a95d4](https://github.com/vuepress/ecosystem/commit/c2a95d4840571996fc9b5504a91dfbecaede4a71))
- **plugin-catalog:** prefer rem unit ([cb18654](https://github.com/vuepress/ecosystem/commit/cb18654673b51994a9dae253a6a9070797ea1faa))
- **plugin-git:** add built-in component `<Contributors/>` `<Changelog/>`, close [#375](https://github.com/vuepress/ecosystem/issues/375) ([#384](https://github.com/vuepress/ecosystem/issues/384)) ([56cece7](https://github.com/vuepress/ecosystem/commit/56cece7f085b761724a3a338a0237a22dde92bb4))
- **plugin-notice:** add markdown format support for notice content, close [#376](https://github.com/vuepress/ecosystem/issues/376) ([#382](https://github.com/vuepress/ecosystem/issues/382)) ([7b7068e](https://github.com/vuepress/ecosystem/commit/7b7068e1c344fe39183208f52fb339cb3b9be946))
- **plugin-sitemap:** respect rem in template ([3958f58](https://github.com/vuepress/ecosystem/commit/3958f58c82432777f83f3c7f73086e77c17f73e3))
- prefer rem unit ([869e08c](https://github.com/vuepress/ecosystem/commit/869e08cdd9a31924663be1000048358e8110b92b))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

### Bug Fixes
34 changes: 34 additions & 0 deletions docs/.vuepress/components/ToggleRTLButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<script setup lang="ts">
import { ref } from 'vue'
const isRTL = ref(false)
const toggleRTL = (): void => {
const { documentElement } = document
if (isRTL.value) {
documentElement.removeAttribute('dir')
documentElement.style.removeProperty('direction')
} else {
documentElement.setAttribute('dir', 'rtl')
documentElement.style.setProperty('direction', 'rtl')
}
isRTL.value = !isRTL.value
}
</script>

<template>
<button type="button" class="toggle-rtl-button" @click="toggleRTL">
<VPIcon :icon="`toggle-${isRTL ? 'right' : 'left'}`" size="2rem" />
</button>
</template>

<style>
.toggle-rtl-button {
border-width: 0;
background: transparent;
color: var(--vp-c-text);
cursor: pointer;
}
</style>
14 changes: 7 additions & 7 deletions docs/.vuepress/components/VPNavbarDropdown.vue
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ const props = defineProps<{
const { config } = toRefs(props)
const [open, toggleOpen] = useToggle(false)
const [open, toggleOpen] = useToggle()
const dropdownAriaLabel = computed(
() => config.value.ariaLabel || config.value.text,
@@ -165,8 +165,8 @@ onContentUpdated(() => {
.vp-navbar-dropdown-wrapper:not(.mobile) & {
position: absolute;
inset-inline-end: 0;
top: 100%;
right: 0;
display: none;
@@ -184,7 +184,7 @@ onContentUpdated(() => {
background-color: var(--vp-c-bg-elv);
text-align: left;
text-align: start;
white-space: nowrap;
}
}
@@ -274,14 +274,14 @@ onContentUpdated(() => {
content: '';
position: absolute;
inset-inline-start: 9px;
top: calc(50% - 2px);
left: 9px;
width: 0;
height: 0;
border-top: 3px solid transparent;
border-bottom: 3px solid transparent;
border-left: 5px solid var(--vp-c-accent);
border-inline-start: 5px solid var(--vp-c-accent);
}
}
}
@@ -315,7 +315,7 @@ onContentUpdated(() => {
}
> span {
padding: 0 1.5rem 0 1.25rem;
padding-inline: 1.25rem 1.5rem;
}
> .auto-link {
@@ -338,7 +338,7 @@ onContentUpdated(() => {
font-size: 0.9em;
.vp-navbar-dropdown-wrapper.mobile & {
padding-left: 1rem;
padding-inline-start: 1rem;
font-size: 14px;
}
}
19 changes: 11 additions & 8 deletions docs/.vuepress/components/VPSidebarItem.vue
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ onBeforeUnmount(() => {
@use '@vuepress/theme-default/styles/variables' as *;
.vp-sidebar-item {
border-left: 0.25rem solid transparent;
border-inline-start: 0.25rem solid transparent;
color: var(--vp-c-text);
cursor: default;
@@ -119,7 +119,8 @@ onBeforeUnmount(() => {
box-sizing: border-box;
width: 100%;
margin: 0;
padding: 0.35rem 1.5rem 0.35rem 1.25rem;
padding-block: 0.35rem;
padding-inline: 1.25rem 1.5rem;
font-weight: bold;
font-size: 1.1em;
@@ -143,33 +144,35 @@ onBeforeUnmount(() => {
box-sizing: border-box;
width: 100%;
margin: 0;
padding: 0.35rem 1rem 0.35rem 2rem;
padding-block: 0.35rem;
padding-inline: 2rem 1rem;
font-weight: 400;
font-size: 1em;
line-height: 1.4;
+ .vp-sidebar-children {
padding-left: 1rem;
padding-inline-start: 1rem;
font-size: 0.95em;
}
.vp-sidebar-children .vp-sidebar-children & {
padding: 0.25rem 1rem 0.25rem 1.75rem;
padding-block: 0.25rem;
padding-inline: 1.75rem 1rem;
&.active {
border-left-color: transparent;
border-inline-start-color: transparent;
font-weight: 500;
}
}
a.vp-sidebar-heading + .vp-sidebar-children &.active {
border-left-color: transparent;
border-inline-start-color: transparent;
}
}
&.active:not(p.vp-sidebar-heading) {
border-left-color: var(--vp-c-accent);
border-inline-start-color: var(--vp-c-accent);
color: var(--vp-c-accent);
font-weight: 600;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Unable to render rich display

Invalid image source.

10 changes: 10 additions & 0 deletions docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:root {
--code-c-bg: #fafafa;
--code-tabs-c-text: var(--vp-c-text);
--code-tabs-c-bg: rgba(0 0 0 / 10%);
}

[data-theme='dark'] {
--code-c-bg: #282c34;
--code-tabs-c-bg: #181819;
}
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
"@vueuse/core": "^12.7.0",
"katex": "0.16.21",
"mathjax-full": "3.2.2",
"sass-embedded": "^1.85.0",
"sass-embedded": "^1.85.1",
"sass-loader": "^16.0.5",
"vue": "^3.5.13",
"vuepress": "catalog:"
89 changes: 89 additions & 0 deletions docs/plugins/development/git.md
Original file line number Diff line number Diff line change
@@ -192,6 +192,43 @@ This plugin will significantly slow down the speed of data preparation, especial

Page filter, if it returns `true`, the page will collect git information.

### locales

- Type: `Record<string, GitLocaleData>`

```ts
export interface GitLocaleData {
/**
* Contributors title
*/
contributors: string

/**
* Changelog title
*/
changelog: string

/**
* Word to represent a commit "on" a time
*/
timeOn: string

/**
* Changelog button
*/
viewChangelog: string

/**
* Latest updated
*/
latestUpdateAt: string
}
```

- Details:

Locales configuration, used in the [Git Component](#component).

## Frontmatter

### gitInclude
@@ -343,3 +380,55 @@ interface GitChangelog {
The changelog of the page.

This attribute would also include contributors to the files listed in [gitInclude](#gitinclude).

## Git Component{#component}

The plugin provides components related to Git information, which can be used in themes.

The components are imported as follows:

```ts
import { Changelog, Contributors } from '@vuepress/plugin-git/client'
```

### Contributors

List the contributor information for the current page.

```vue{8}
<script setup>
import { Contributors } from '@vuepress/plugin-git/client'
</script>
<template>
<div vp-content>
<Content />
<Contributors />
</div>
</template>
```

**Effect Preview:**

![contributors](/images/git/contributor-en.png)

### Changelog

List the changelog of the current page.

```vue{8}
<script setup>
import { Changelog } from '@vuepress/plugin-git/client'
</script>
<template>
<div vp-content>
<Content />
<Changelog />
</div>
</template>
```

**Effect Preview:**

![changelog](/images/git/changelog-en.png)
8 changes: 8 additions & 0 deletions docs/plugins/development/rtl.md
Original file line number Diff line number Diff line change
@@ -27,6 +27,10 @@ export default {
}
```

## Demo

<ToggleRTLButton />

## Options

### locales
@@ -55,3 +59,7 @@ export default {
Selector to enable rtl.

The default settings mean that the `dir` attribute of the `html` element will be set to `rtl` in rtl locales.

<script setup>
import ToggleRTLButton from '@source/.vuepress/components/ToggleRTLButton.vue'
</script>
39 changes: 36 additions & 3 deletions docs/plugins/features/notice.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,12 @@ Each notice options needs to contain a `path` or `match` option, which is used t
A notice configuration item includes:

- `title`: Notice title, support both text and HTMLString
- `content`: Notice content, support both text and HTMLString
- `content`: Notice content, support both text, HTMLString and Markdown

- When using `Markdown` as content, the `contentType` should be set to `markdown`.

- You can also use `contentFile` to specify the absolute path of a file, with the file format being `.md` or `.html`, to read the notice content from the file.

- `actions`: Notice actions

Should be an array of objects containing:
@@ -51,6 +56,7 @@ Here is an example:

```ts
import { noticePlugin } from '@vuepress/plugin-notice'
import { path } from 'vuepress/utils'

export default {
plugins: [
@@ -72,7 +78,21 @@ export default {
{
path: '/zh/',
title: 'Notice Title',
content: 'Notice Content',
contentType: 'markdown',
content: '**Notice Content** [link](https://example.com)',
actions: [
{
text: 'Primary Action',
link: 'https://theme-hope.vuejs.press/',
type: 'primary',
},
{ text: 'Default Action' },
],
},
{
path: '/example/',
title: 'Notice Title',
contentFile: path.resolve(__dirname, 'notice.md'),
actions: [
{
text: 'Primary Action',
@@ -132,7 +152,20 @@ However, if you want users to confirm the notice, you can set `confirm: true`, s
/**
* Notice content
*/
content: string
content?: string

/**
* Notice content type
* @default 'html'
*/
contentType?: 'html' | 'markdown'

/**
* Notice content file absolute path, file format should be `.md` or `.html`.
* Prioritize using the file content as `content`.
* @example '/path/to/notice.md'
*/
contentFile?: string

/**
* Notice key
30 changes: 30 additions & 0 deletions docs/plugins/markdown/prismjs.md
Original file line number Diff line number Diff line change
@@ -400,6 +400,36 @@ body > div {
}
```

### codeBlockTitle

- Type: `boolean | CodeBlockTitleRender`

```ts
type CodeBlockTitleRender = (title: string, code: string) => string
```
- Default: `true`
- Details: Whether to enable code block title rendering. Add `title="Title"` after the code block <code>\`\`\`</code> to set the title.
Pass `CodeBlockTitleRender` to customize the title rendering.
- Example:
**Input:**
````md {1}
```ts title="foo/baz.js"
console.log('hello')
```
````
**Output:**
```ts title="foo/baz.js"
console.log('hello')
```
::: tip
In the new version, some functionalities similar to [shiki](https://shiki.style/packages/transformers) have been implemented, allowing you to style code blocks using the same syntax.
30 changes: 30 additions & 0 deletions docs/plugins/markdown/shiki.md
Original file line number Diff line number Diff line change
@@ -394,6 +394,36 @@ body > div {
}
```

### codeBlockTitle

- Type: `boolean | CodeBlockTitleRender`

```ts
type CodeBlockTitleRender = (title: string, code: string) => string
```
- Default: `true`
- Details: Whether to enable code block title rendering. Add `title="Title"` after the code block <code>\`\`\`</code> to set the title.
Pass `CodeBlockTitleRender` to customize the title rendering.
- Example:
**Input:**
````md {1}
```ts title="foo/baz.js"
console.log('hello')
```
````
**Output:**
```ts title="foo/baz.js"
console.log('hello')
```
### notationDiff
- Type: `boolean`
85 changes: 85 additions & 0 deletions docs/zh/plugins/development/git.md
Original file line number Diff line number Diff line change
@@ -185,6 +185,39 @@ export default {

页面过滤器,如果返回 `true` ,该页面将收集 git 信息

### locales

- 类型: `Record<string, GitLocaleData>`

```ts
export interface GitLocaleData {
/**
* 贡献者 标题
*/
contributors: string
/**
* 更新日志 标题
*/
changelog: string
/**
* 更新 `于` 文本
*/
timeOn: string
/**
* 查看更新日志 文本
*/
viewChangelog: string
/**
* 最近更新 文本
*/
latestUpdateAt: string
}
```

- 详情:

多语言配置,在 [Git 组件](#component) 中使用。

## Frontmatter

### gitInclude
@@ -335,3 +368,55 @@ interface GitChangelog {
页面的变更历史记录。

该属性将会包含 [gitInclude](#gitinclude) 所列文件的变更历史记录。

## Git 组件{#component}

插件提供了与 Git 信息相关的组件,可以在主题中使用。

组件通过以下方式导入:

```ts
import { Changelog, Contributors } from '@vuepress/plugin-git/client'
```

### Contributors

列出当前页面的贡献者信息。

```vue{8}
<script setup>
import { Contributors } from '@vuepress/plugin-git/client'
</script>
<template>
<div vp-content>
<Content />
<Contributors />
</div>
</template>
```

**效果预览:**

![contributors](/images/git/contributor-zh.png)

### Changelog

列出当前页面的变更历史记录。

```vue{8}
<script setup>
import { Changelog } from '@vuepress/plugin-git/client'
</script>
<template>
<div vp-content>
<Content />
<Changelog />
</div>
</template>
```

**效果预览:**

![changelog](/images/git/changelog-zh.png)
8 changes: 8 additions & 0 deletions docs/zh/plugins/development/rtl.md
Original file line number Diff line number Diff line change
@@ -27,6 +27,10 @@ export default {
}
```

## 示例

<ToggleRTLButton />

## 选项

### locales
@@ -55,3 +59,7 @@ export default {
开启 RTL 的选择器。

默认设置意味着在 RTL 多语言中,`html` 元素的 `dir` 属性将被设置为 `rtl`

<script setup>
import ToggleRTLButton from '@source/.vuepress/components/ToggleRTLButton.vue'
</script>
36 changes: 34 additions & 2 deletions docs/zh/plugins/features/notice.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,11 @@ export default {
一个公告配置包括:

- `title`: 通知标题,支持文本和 HTMLString
- `content`: 通知内容,支持文本和 HTMLString
- `content`: 通知内容,支持文本、HTMLString 和 Markdown

- 使用 `Markdown` 作为内容时,应设置 `contentType``markdown`
- 还可以使用 `contentFile` 指定文件绝对路径,文件格式为 `.md``.html`,从文件中读取通知内容。

- `actions`: 通知操作

应该是包含以下内容的对象数组:
@@ -51,6 +55,7 @@ export default {

```ts
import { noticePlugin } from '@vuepress/plugin-notice'
import { path } from 'vuepress/utils'

export default {
plugins: [
@@ -72,7 +77,21 @@ export default {
{
path: '/zh/',
title: 'Notice Title',
content: 'Notice Content',
contentType: 'markdown',
content: '**Notice Content** [link](https://example.com)',
actions: [
{
text: 'Primary Action',
link: 'https://theme-hope.vuejs.press/',
type: 'primary',
},
{ text: 'Default Action' },
],
},
{
path: '/example/',
title: 'Notice Title',
contentFile: path.resolve(__dirname, 'notice.md'),
actions: [
{
text: 'Primary Action',
@@ -134,6 +153,19 @@ export default {
*/
content: string

/**
* 通知内容类型
* @default 'html'
*/
contentType?: 'html' | 'markdown'

/**
* 通知内容文件绝对路径, 文件格式支持 `.md` 或 `.html`
* 优先使用文件内容作为 `content`
* @example '/path/to/notice.md'
*/
contentFile?: string

/**
* Notice 的 key
*
30 changes: 30 additions & 0 deletions docs/zh/plugins/markdown/prismjs.md
Original file line number Diff line number Diff line change
@@ -400,6 +400,36 @@ body > div {
}
```

### codeBlockTitle

- 类型:`boolean | CodeBlockTitleRender`

```ts
type CodeBlockTitleRender = (title: string, code: string) => string
```
- 默认值:`true`
- 详情:是否启用代码块标题渲染。在代码块 <code>\`\`\`</code> 后面添加 `title="标题"` 来设置标题。
传入 `CodeBlockTitleRender` 以自定义标题渲染。
- 示例:
**输入:**
````md {1}
```ts title="foo/baz.js"
console.log('hello')
```
````
**输出:**
```ts title="foo/baz.js"
console.log('hello')
```
::: tip
在新的版本中,实现了类似于 [shiki](https://shiki.style/packages/transformers) 的部分功能,
30 changes: 30 additions & 0 deletions docs/zh/plugins/markdown/shiki.md
Original file line number Diff line number Diff line change
@@ -396,6 +396,36 @@ body > div {
}
```

### codeBlockTitle

- 类型:`boolean | CodeBlockTitleRender`

```ts
type CodeBlockTitleRender = (title: string, code: string) => string
```
- 默认值:`true`
- 详情:是否启用代码块标题渲染。在代码块 <code>\`\`\`</code> 后面添加 `title="标题"` 来设置标题。
传入 `CodeBlockTitleRender` 以自定义标题渲染。
- 示例:
**输入:**
````md {1}
```ts title="foo/baz.js"
console.log('hello')
```
````
**输出:**
```ts title="foo/baz.js"
console.log('hello')
```
### notationDiff
- 类型:`boolean`
13 changes: 13 additions & 0 deletions e2e/docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -256,6 +256,19 @@ export default defineUserConfig({
],
fullscreen: true,
},
{
match: /^\/notice\/file\.html$/,
title: 'Notice Title',
contentFile: path.resolve(__dirname, './notice.md'),
actions: [
{
text: 'Primary Action',
link: 'https://example.com/',
type: 'primary',
},
{ text: 'Default Action' },
],
},
],
}),
photoSwipePlugin(),
2 changes: 1 addition & 1 deletion e2e/docs/.vuepress/layouts/Category.vue
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ const routePath = useRoutePath()
& {
padding-top: calc(var(--navbar-height) + 1rem) !important;
padding-bottom: 0 !important;
font-size: 14px;
font-size: 0.875rem;
}

.route-link {
2 changes: 1 addition & 1 deletion e2e/docs/.vuepress/layouts/Tag.vue
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ const routePath = useRoutePath()
& {
padding-top: calc(var(--navbar-height) + 1rem) !important;
padding-bottom: 0 !important;
font-size: 14px;
font-size: 0.875rem;
}

.route-link {
1 change: 1 addition & 0 deletions e2e/docs/.vuepress/notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Notice Content** [link](https://example.com)
1 change: 1 addition & 0 deletions e2e/docs/notice/file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Load Notice Content From File
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
"@vuepress/plugin-theme-data": "workspace:*",
"@vuepress/plugin-watermark": "workspace:*",
"@vuepress/theme-default": "workspace:*",
"sass-embedded": "^1.85.0",
"sass-embedded": "^1.85.1",
"sass-loader": "^16.0.5",
"vue": "^3.5.13",
"vuepress": "catalog:"
15 changes: 15 additions & 0 deletions e2e/tests/plugin-notice/notice.spec.ts
Original file line number Diff line number Diff line change
@@ -34,4 +34,19 @@ test.describe('notice', () => {

await expect(page.locator('.vp-notice-wrapper')).toHaveCount(0)
})

test('load notice content from markdown file', async ({ page }) => {
await page.goto('notice/file.html')

await expect(page.locator('.vp-notice-wrapper')).toHaveCount(1)

await expect(page.locator('.vp-notice-content strong')).toHaveText(
'Notice Content',
)

await expect(page.locator('.vp-notice-content a')).toHaveAttribute(
'href',
'https://example.com',
)
})
})
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"npmClient": "pnpm",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"command": {
"version": {
"allowBranch": "main",
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -34,12 +34,12 @@
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@lerna-lite/cli": "^3.12.1",
"@lerna-lite/publish": "^3.12.1",
"@lerna-lite/publish": "^3.12.2",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-node-resolve": "^16.0.0",
"@types/node": "^22.13.5",
"@types/node": "^22.13.9",
"@types/webpack-env": "^1.18.8",
"@vitest/coverage-istanbul": "3.0.6",
"@vitest/coverage-istanbul": "3.0.7",
"conventional-changelog-cli": "^5.0.0",
"cpx2": "^8.0.0",
"cross-env": "^7.0.3",
@@ -49,26 +49,26 @@
"husky": "^9.1.7",
"nano-staged": "^0.8.0",
"postcss-html": "^1.8.0",
"prettier": "^3.5.2",
"prettier": "^3.5.3",
"prettier-config-vuepress": "^5.0.0",
"rimraf": "^6.0.1",
"rollup": "^4.34.8",
"rollup": "^4.34.9",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-esbuild": "^6.2.0",
"rollup-plugin-esbuild": "^6.2.1",
"rollup-plugin-resolve-shebang": "^1.0.1",
"sass-embedded": "^1.85.0",
"sort-package-json": "^2.14.0",
"stylelint": "^16.14.1",
"sass-embedded": "^1.85.1",
"sort-package-json": "^2.15.1",
"stylelint": "^16.15.0",
"stylelint-config-hope": "^8.0.0",
"stylelint-config-html": "^1.1.0",
"tsconfig-vuepress": "^5.2.1",
"tsx": "^4.19.3",
"typescript": "^5.7.3",
"typescript": "^5.8.2",
"vite": "~6.1.1",
"vitest": "3.0.6",
"vitest": "3.0.7",
"vuepress": "catalog:"
},
"packageManager": "pnpm@10.4.1",
"packageManager": "pnpm@10.5.2",
"engines": {
"node": "^18.19.0 || >= 20.6.0"
},
4 changes: 4 additions & 0 deletions plugins/analytics/plugin-baidu-analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-baidu-analytics

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-baidu-analytics
2 changes: 1 addition & 1 deletion plugins/analytics/plugin-baidu-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-baidu-analytics",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - baidu-analytics",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/analytics/plugin-umami-analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-umami-analytics

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-umami-analytics
2 changes: 1 addition & 1 deletion plugins/analytics/plugin-umami-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-umami-analytics",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - umami-analytics",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/blog/plugin-blog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-blog

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-blog
2 changes: 1 addition & 1 deletion plugins/blog/plugin-blog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-blog",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - blog",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/blog/plugin-comment/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-comment

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

### Bug Fixes
2 changes: 1 addition & 1 deletion plugins/blog/plugin-comment/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-comment",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - comment",
"keywords": [
"vuepress-plugin",
6 changes: 6 additions & 0 deletions plugins/blog/plugin-feed/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Features

- prefer rem unit ([869e08c](https://github.com/vuepress/ecosystem/commit/869e08cdd9a31924663be1000048358e8110b92b))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-feed
2 changes: 1 addition & 1 deletion plugins/blog/plugin-feed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-feed",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "Feed plugin for vuepress-theme-hope",
"keywords": [
"vuepress",
28 changes: 12 additions & 16 deletions plugins/blog/plugin-feed/templates/atom.xsl
Original file line number Diff line number Diff line change
@@ -44,10 +44,6 @@
background: var(--c-bg);
}

html {
font-size: 16px;
}

body {
min-height: 100vh;
color: var(--c-text);
@@ -254,7 +250,7 @@
margin: 0.5rem auto;
border: 1px solid #fff;
border-collapse: collapse;
border-radius: 8px;
border-radius: 0.5rem;

text-align: start;
}
@@ -334,13 +330,13 @@
}

.atom-info {
margin-top: 4px;
font-size: 14px;
margin-top: 0.25rem;
font-size: 0.875rem;
}

.atom-info > span {
display: inline-block;
margin: 4px 8px 4px 0;
margin: 0.25em 0.5em 0.25em 0;
}

.atom-info > span:last-child {
@@ -353,14 +349,14 @@
}

.atom-body {
padding: 4px 16px;
padding: 0.25rem 1rem;
}

.atom-footer {
display: flex;
justify-content: space-between;
padding: 8px 16px;
font-size: 14px;
padding: 0.5rem 1rem;
font-size: 0.875rem;
}

.atom-footer label {
@@ -370,20 +366,20 @@
.atom-link {
display: inline-block;

padding: 6px 12px;
border-radius: 8px;
padding: 0.375em 0.75em;
border-radius: 0.5em;

background: var(--c-accent);
color: var(--c-bg-elv);
}

footer {
margin-top: 10px;
padding: 4px;
margin-top: 0.75rem;
padding: 0.25rem;

color: #888;

font-size: 12px;
font-size: 0.75rem;
text-align: center;
}
</style>
6 changes: 6 additions & 0 deletions plugins/development/plugin-git/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Features

- **plugin-git:** add built-in component `<Contributors/>` `<Changelog/>`, close [#375](https://github.com/vuepress/ecosystem/issues/375) ([#384](https://github.com/vuepress/ecosystem/issues/384)) ([56cece7](https://github.com/vuepress/ecosystem/commit/56cece7f085b761724a3a338a0237a22dde92bb4))

# [2.0.0-rc.79](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.78...v2.0.0-rc.79) (2025-02-23)

**Note:** Version bump only for package @vuepress/plugin-git
11 changes: 8 additions & 3 deletions plugins/development/plugin-git/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-git",
"version": "2.0.0-rc.79",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - git",
"keywords": [
"vuepress-plugin",
@@ -22,6 +22,7 @@
"type": "module",
"exports": {
".": "./lib/node/index.js",
"./client": "./lib/client/index.js",
"./package.json": "./package.json"
},
"main": "./lib/node/index.js",
@@ -32,10 +33,14 @@
"scripts": {
"build": "tsc -b tsconfig.build.json",
"bundle": "rollup -c rollup.config.ts --configPlugin esbuild",
"clean": "rimraf --glob ./lib ./*.tsbuildinfo"
"clean": "rimraf --glob ./lib ./*.tsbuildinfo",
"style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node"
},
"dependencies": {
"execa": "^9.5.2"
"@vuepress/helper": "workspace:*",
"@vueuse/core": "^12.7.0",
"execa": "^9.5.2",
"vue": "^3.5.13"
},
"peerDependencies": {
"vuepress": "catalog:"
9 changes: 6 additions & 3 deletions plugins/development/plugin-git/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { rollupBundle } from '../../../scripts/rollup.js'

export default rollupBundle('node/index', {
external: ['execa'],
})
export default [
...rollupBundle('node/index', {
external: ['execa'],
}),
...rollupBundle('client/index'),
]
143 changes: 143 additions & 0 deletions plugins/development/plugin-git/src/client/components/Changelog.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import { useToggle } from '@vueuse/core'
import type { FunctionalComponent } from 'vue'
import { computed, defineComponent, h } from 'vue'
import { usePageData, usePageFrontmatter, usePageLang } from 'vuepress/client'
import type {
GitChangelog,
GitPluginFrontmatter,
GitPluginPageData,
} from '../../shared/index.js'
import { useGitLocaleConfig } from '../composables/index.js'
import { VPHeader } from './VPHeader.js'

import '../styles/vars.css'
import '../styles/changelog.css'

type ResolvedChangelog = Omit<GitChangelog, 'date'> & { datetime: string }

export const Changelog = defineComponent({
name: 'Changelog',

props: {
/** Title of changelog */
title: String,

/** header level of changelog */
headerLevel: {
type: Number,
default: 2,
},
},

setup(props) {
const locale = useGitLocaleConfig()
const frontmatter = usePageFrontmatter<GitPluginFrontmatter>()
const page = usePageData<GitPluginPageData>()
const lang = usePageLang()

const list = computed<ResolvedChangelog[]>(() => {
if (frontmatter.value.changelog === false) return []

const formatter = new Intl.DateTimeFormat(lang.value, {
dateStyle: 'short',
})

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
return (page.value.git?.changelog ?? []).map(({ date, ...item }) => {
const datetime = formatter.format(date)
return { datetime, ...item }
})
})

const latestUpdated = computed(() => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const latest = (page.value.git?.changelog ?? [])[0]

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!latest) return ''

const formatter = new Intl.DateTimeFormat(lang.value, {
dateStyle: 'short',
timeStyle: 'short',
})
return formatter.format(latest.date)
})

const [active, toggle] = useToggle()

const ChangelogHeader: FunctionalComponent = () =>
h('div', { class: 'changelog-header', onClick: toggle }, [
h('div', { class: 'latest-updated' }, [
h('span', { class: 'vpi-changelog' }),
h('span', [locale.value.latestUpdateAt, ' ']),
h('span', { 'data-allow-mismatch': '' }, latestUpdated.value),
]),
h('div', [
h('span', { class: 'vpi-changelog-menu' }),
h('span', locale.value.viewChangelog),
]),
])

const ReleaseTag: FunctionalComponent<{ item: ResolvedChangelog }> = ({
item,
}) =>
h(
'li',
{ class: 'changelog release-tag' },
h('div', [
h('a', { class: 'link release-tag' }, h('code', item.tag)),
h('span', { 'class': 'datetime', 'data-allow-mismatch': '' }, [
locale.value.timeOn,
' ',
item.datetime,
]),
]),
)

const Commit: FunctionalComponent<{ item: ResolvedChangelog }> = ({
item,
}) =>
h('li', { class: 'changelog commit' }, [
h(
item.commitUrl ? 'a' : 'span',
{
class: 'link hash',
href: item.commitUrl,
target: '_blank',
rel: 'noreferrer',
},
[h('code', item.hash.slice(0, 5))],
),
h('span', { class: 'divider' }, '-'),
h('span', { class: 'message', innerHTML: item.message }),
h('span', { 'class': 'datetime', 'data-allow-mismatch': '' }, [
locale.value.timeOn || 'on',
' ',
item.datetime,
]),
])

return () =>
list.value.length
? [
h(VPHeader, {
level: props.headerLevel,
anchor: 'doc-changelog',
text: props.title || locale.value.changelog,
}),

h('div', { class: ['vp-changelog', { active: active.value }] }, [
h(ChangelogHeader),

h('ul', { class: 'changelog-list' }, [
list.value.map((item) =>
item.tag
? h(ReleaseTag, { item, key: item.tag })
: h(Commit, { item, key: item.hash }),
),
]),
]),
]
: null
},
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import type { VNode } from 'vue'
import { computed, defineComponent, h } from 'vue'
import { usePageData, usePageFrontmatter } from 'vuepress/client'
import type {
GitContributor,
GitPluginFrontmatter,
GitPluginPageData,
} from '../../shared/index.js'
import { useGitLocaleConfig } from '../composables/index.js'
import { VPHeader } from './VPHeader.js'

import '../styles/contributors.css'

export const Contributors = defineComponent({
name: 'Contributors',
props: {
/** Contributor title */
title: String,

/** header level of contributor title */
headerLevel: {
type: Number,
default: 2,
},
},
setup(props) {
const locale = useGitLocaleConfig()
const frontmatter = usePageFrontmatter<GitPluginFrontmatter>()
const page = usePageData<GitPluginPageData>()

const contributors = computed(() => {
if (frontmatter.value.contributors === false) return []
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
return page.value.git?.contributors ?? []
})

const Contributor = ({
item: { name, url, avatar },
}: {
item: GitContributor
}): VNode =>
h(
url ? 'a' : 'span',
{
href: url,
target: '_blank',
rel: 'noreferrer',
class: 'contributor',
},
[
avatar ? h('img', { src: avatar, alt: name, class: 'avatar' }) : null,
h('span', { class: 'name' }, name),
],
)

return () =>
contributors.value.length
? [
h(VPHeader, {
level: props.headerLevel,
anchor: 'doc-contributors',
text: props.title || locale.value.contributors,
}),
h(
'div',
{ class: 'vp-contributors' },
contributors.value.map((item) =>
h(Contributor, { item, key: item.name + item.email }),
),
),
]
: null
},
})
26 changes: 26 additions & 0 deletions plugins/development/plugin-git/src/client/components/VPHeader.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { FunctionalComponent } from 'vue'
import { h } from 'vue'

export interface VPHeaderProps {
/** header text */
text: string
/** header anchor */
anchor: string
/**
* header level
*
* @default 2
*/
level?: number
}

export const VPHeader: FunctionalComponent<VPHeaderProps> = ({
level = 2,
text,
anchor,
}) =>
h(
`h${level || 2}`,
{ id: anchor, tabindex: '-1' },
h('a', { href: `#${anchor}`, class: 'header-anchor' }, h('span', text)),
)
3 changes: 3 additions & 0 deletions plugins/development/plugin-git/src/client/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './Contributors.js'
export * from './Changelog.js'
export * from './VPHeader.js'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './useGitLocales.js'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { ExactLocaleConfig } from '@vuepress/helper/client'
import { useLocaleConfig } from '@vuepress/helper/client'
import type { ComputedRef } from 'vue'
import type { GitLocaleData } from '../../shared/index.js'

declare const __GIT_LOCALES__: ExactLocaleConfig<GitLocaleData>

export const locales = __GIT_LOCALES__

export const useGitLocaleConfig = (): ComputedRef<GitLocaleData> =>
useLocaleConfig(locales)
3 changes: 3 additions & 0 deletions plugins/development/plugin-git/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './components/index.js'
export * from './composables/index.js'
export type * from '../shared/index.js'
155 changes: 155 additions & 0 deletions plugins/development/plugin-git/src/client/styles/changelog.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
.vp-changelog {
margin-block: 2rem 1rem;
padding-inline: 1rem;
border-radius: 8px;

background-color: var(--changelog-bg);
color: var(--changelog-c-text);

font-size: var(--changelog-font-size);
line-height: 1.7;

transition: background-color var(--vp-t-color);

a {
text-decoration: none !important;

&::after {
display: none !important;
}
}

.changelog-header {
display: flex;
align-items: center;
justify-content: space-between;

padding-block: 1rem;

font-weight: bold;

cursor: pointer;

@media (max-width: 419px) {
flex-wrap: wrap;
}

.vpi-changelog,
.vpi-changelog-menu {
display: inline-block;
vertical-align: middle;

width: 1.2em;
height: 1.2em;
margin-inline-end: 4px;

background-color: currentcolor;
color: var(--vp-c-text-mute);

mask: var(--icon) no-repeat;
mask-size: 100% 100%;

transition: color var(--vp-t-color);

transform: translateY(-1px);
}

.vpi-changelog {
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' d='M2.71 10.96a6.5 6.5 0 1 0-.69-3.53M2 8l1.5-1.5M2 8L.5 6.5m8 2v-4m0 4h3'/%3E%3C/svg%3E");
}

.vpi-changelog-menu {
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M4 5h0.01'/%3E%3Cpath d='M8 5h12'/%3E%3Cpath d='M4 10h0.01'/%3E%3Cpath d='M8 10h12'/%3E%3Cpath d='M4 15h0.01'/%3E%3Cpath d='M8 15h12'/%3E%3Cpath d='M4 20h0.01'/%3E%3Cpath d='M8 20h12'/%3E%3C/g%3E%3C/svg%3E");
}
}

.changelog-list {
display: none;

margin-block: 0.5rem;
padding-inline-start: 0;

list-style: none;
}

&.active {
padding-block: 0 0.5rem;

.changelog-header {
padding-block-end: 0.5rem;
}

.changelog-list {
display: block;
}
}

.changelog {
position: relative;
margin-block-start: 8px;
padding-inline-start: 20px;

&:first-child {
margin-block-start: 0;
}

&::before {
content: '';

position: absolute;
top: 3px;
left: 0;

display: inline-block;

width: 1.25em;
height: 1.25em;

background-color: currentcolor;
color: var(--vp-c-text-subtle);

mask: var(--icon) no-repeat;
mask-size: 100% 100%;

transition: color var(--vp-t-color);
}

&.commit::before {
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m3-9v6m0 6v6'/%3E%3C/svg%3E");
}

&.release-tag::before {
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0-2 0'/%3E%3Cpath d='M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592-5.592a2.41 2.41 0 0 0 0-3.408l-7.71-7.71A2 2 0 0 0 11.172 3H6a3 3 0 0 0-3 3'/%3E%3C/g%3E%3C/svg%3E");
}

.release-tag {
margin-inline-end: 4px;
text-decoration: none;
}

.release-tag code {
font-weight: 500;
font-size: 14px;
}

.hash {
margin-inline-end: 4px;
text-decoration: none;
}

.divider {
margin-inline-end: 8px;
}

.message {
margin-inline-end: 8px;
line-height: 1.7;
}

.datetime {
color: var(--vp-c-text-subtle);
font-size: 0.75rem;
transition: color var(--vp-t-color);
}
}
}
30 changes: 30 additions & 0 deletions plugins/development/plugin-git/src/client/styles/contributors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.vp-contributors {
display: flex;
flex-wrap: wrap;
gap: 1rem 1.5rem;
align-items: center;
justify-content: flex-start;

margin: 2rem 0 1rem;

.contributor {
display: flex;
gap: 0.25rem;
align-items: center;

&::after {
display: none !important;
}

.avatar {
object-fit: contain;
width: 36px;
height: 36px;
border-radius: 50%;
}
}

a.contributor {
text-decoration: none !important;
}
}
5 changes: 5 additions & 0 deletions plugins/development/plugin-git/src/client/styles/vars.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:root {
--changelog-bg: var(--vp-c-bg-alt);
--changelog-font-size: 0.875rem;
--changelog-c-text: var(--vp-c-text);
}
20 changes: 16 additions & 4 deletions plugins/development/plugin-git/src/node/gitPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { getFullLocaleConfig } from '@vuepress/helper'
import type { Page, Plugin } from 'vuepress/core'
import { isPlainObject } from 'vuepress/shared'
import { path } from 'vuepress/utils'
import type {
GitPluginFrontmatter,
GitPluginOptions,
GitPluginPageData,
} from './options.js'
} from '../shared/index.js'
import { gitLocaleInfo } from './locales.js'
import type { GitPluginOptions } from './options.js'
import { resolveChangelog } from './resolveChangelog.js'
import { resolveContributors } from './resolveContributors.js'
import { checkGitRepo, getCommits, inferGitProvider } from './utils/index.js'
@@ -19,14 +21,24 @@ export const gitPlugin =
filter,
// eslint-disable-next-line @typescript-eslint/no-deprecated
transformContributors,
locales = {},
}: GitPluginOptions = {}): Plugin =>
(app) => {
const name = '@vuepress/plugin-git'
const cwd = app.dir.source()
const isGitRepoValid = checkGitRepo(cwd)
const gitProvider = isGitRepoValid ? inferGitProvider(cwd) : null

return {
name: '@vuepress/plugin-git',
name,

define: {
__GIT_LOCALES__: getFullLocaleConfig({
app,
name,
default: gitLocaleInfo,
config: locales,
}),
},

extendsPage: async (
page: Page<GitPluginPageData, GitPluginFrontmatter>,
1 change: 1 addition & 0 deletions plugins/development/plugin-git/src/node/index.ts
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ export * from './resolveContributors.js'
export * from './utils/index.js'
export type * from './options.js'
export type * from './typings.js'
export type * from '../shared/index.js'
205 changes: 205 additions & 0 deletions plugins/development/plugin-git/src/node/locales.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
import type { DefaultLocaleInfo } from '@vuepress/helper'
import type { GitLocaleData } from '../shared/index.js'

export const gitLocaleInfo: DefaultLocaleInfo<GitLocaleData> = [
[
['en', 'en-US'],
{
contributors: 'Contributors',
changelog: 'Changelog',
timeOn: 'on',
viewChangelog: 'View All Changelog',
latestUpdateAt: 'Last Updated:',
},
],
[
['zh', 'zh-CN', 'zh-Hans'],
{
contributors: '贡献者',
changelog: '更新日志',
timeOn: '于',
viewChangelog: '查看所有更新日志',
latestUpdateAt: '最近更新:',
},
],
[
['zh-TW', 'zh-Hant'],
{
contributors: '貢獻者',
changelog: '更新日誌',
timeOn: '於',
viewChangelog: '查看所有更新日誌',
latestUpdateAt: '最近更新:',
},
],
[
['de', 'de-DE'],
{
contributors: 'Mitwirkende',
changelog: 'Aenderungen',
timeOn: 'am',
viewChangelog: 'Alle Aenderungen anzeigen',
latestUpdateAt: 'Zuletzt aktualisiert:',
},
],
[
['de-AT'],
{
contributors: 'Mitwirkende',
changelog: 'Aenderungen',
timeOn: 'am',
viewChangelog: 'Alle Aenderungen anzeigen',
latestUpdateAt: 'Zuletzt aktualisiert:',
},
],
[
['vi', 'vi-VN'],
{
contributors: 'Người tham gia',
changelog: 'Lịch sử thay đổi',
timeOn: 'vào',
viewChangelog: 'Xem tất cả lịch sử thay đổi',
latestUpdateAt: 'Cập nhật gần nhất:',
},
],
[
['uk'],
{
contributors: 'Учасники',
changelog: 'Історія змін',
timeOn: 'в',
viewChangelog: 'Показати всю історію змін',
latestUpdateAt: 'Останнє оновлення:',
},
],
[
['ru', 'ru-RU'],
{
contributors: 'Участники',
changelog: 'История изменений',
timeOn: 'в',
viewChangelog: 'Показать всю историю изменений',
latestUpdateAt: 'Последнее обновление:',
},
],
[
['br'],
{
contributors: 'Colaboradores',
changelog: 'Log de Alterações',
timeOn: 'em',
viewChangelog: 'Ver todas as Alterações',
latestUpdateAt: 'Atualizado em:',
},
],
[
['pl', 'pl-PL'],
{
contributors: 'Współpracownicy',
changelog: 'Zmiany',
timeOn: 'w',
viewChangelog: 'Zobacz wszystkie zmiany',
latestUpdateAt: 'Ostatnio zaktualizowano:',
},
],
[
['sk', 'sk-SK'],
{
contributors: 'Pracovnici',
changelog: 'Zmeny',
timeOn: 'na',
viewChangelog: 'Zobrazit vsetky zmeny',
latestUpdateAt: 'Poslednou aktualizaciu:',
},
],
[
['fr', 'fr-FR'],
{
contributors: 'Contribueurs',
changelog: 'Historique des modifications',
timeOn: 'le',
viewChangelog: "Voir l'historique des modifications",
latestUpdateAt: 'Dernière mise à jour:',
},
],
[
['es', 'es-ES'],
{
contributors: 'Colaboradores',
changelog: 'Historial de cambios',
timeOn: 'el',
viewChangelog: 'Ver el historial de cambios',
latestUpdateAt: 'Actualizado el:',
},
],
[
['ja', 'ja-JP'],
{
contributors: '貢献者',
changelog: '変更履歴',
timeOn: '日',
viewChangelog: '全ての変更履歴を表示',
latestUpdateAt: '最終更新:',
},
],
[
['tr', 'tr-TR'],
{
contributors: 'Katkıda bulunanlar',
changelog: 'Düzenleme Girişimleri',
timeOn: 'de',
viewChangelog: 'Tüm düzenleme girişimlerini göster',
latestUpdateAt: 'Son günceleme:',
},
],
[
['ko', 'ko-KO'],
{
contributors: '기업자',
changelog: '변경 기록',
timeOn: '에서',
viewChangelog: '변경 기록 별 상세 내용 바보기',
latestUpdateAt: '최근 수정:',
},
],
[
['fi', 'fi-FI'],
{
contributors: 'Osallistujat',
changelog: 'Muutokset',
timeOn: 'kun',
viewChangelog: 'Näytä kaikki muutokset',
latestUpdateAt: 'Viimeksi paivittynyt:',
},
],
[
['hu', 'hu-HU'],
{
contributors: 'Szerkesztők',
changelog: 'Modosítások',
timeOn: 'ben',
viewChangelog: 'Minden modosítás megtekintése',
latestUpdateAt: 'Legutóbb frissítés:',
},
],
[
['id', 'id-ID'],
{
contributors: 'Pembuat',
changelog: 'Perubahan',
timeOn: 'pada',
viewChangelog: 'Lihat semua perubahan',
latestUpdateAt: 'Diperbarui terakhir:',
},
],
[
['nl', 'nl-NL'],
{
contributors: 'Bijdragers',
changelog: 'Wijzigingen',
timeOn: 'op',
viewChangelog: 'Bekijk alle wijzigingen',
latestUpdateAt: 'Laatst bijgewerkt:',
},
],
]
46 changes: 5 additions & 41 deletions plugins/development/plugin-git/src/node/options.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Page, PageFrontmatter } from 'vuepress'
import type { GitChangelog, GitContributor } from './typings.js'
import type { LocaleConfig, Page } from 'vuepress'
import type { GitContributor, GitLocaleData } from '../shared/index.js'

/**
* Contributor information
@@ -191,47 +191,11 @@ export interface GitPluginOptions {
* Functions to transform contributors, e.g. remove duplicates ones and sort them
*/
transformContributors?: (contributors: GitContributor[]) => GitContributor[]
}

export interface GitPluginFrontmatter extends PageFrontmatter {
gitInclude?: string[]

/**
* Whether to get the contributors of a page
* Localization config
*
* - If the value is `false`, it will be ignored
* - If the value is `string[]`, it will be used as the list of extra contributors
*/
contributors?: string[] | boolean

/**
* Whether to get the changelog of a page
*/
changelog?: boolean
}

export interface GitPluginPageData extends Record<string, unknown> {
git: GitData
}

export interface GitData {
/**
* Unix timestamp in milliseconds of the first commit
*/
createdTime?: number

/**
* Unix timestamp in milliseconds of the last commit
*/
updatedTime?: number

/**
* Contributors of all commits
*/
contributors?: GitContributor[]

/**
* Changelog of a page
* 本地化配置
*/
changelog?: GitChangelog[]
locales?: LocaleConfig<GitLocaleData>
}
7 changes: 2 additions & 5 deletions plugins/development/plugin-git/src/node/resolveChangelog.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import type { App } from 'vuepress'
import type { GitChangelog } from '../shared/index.js'
import type { ChangelogOptions, ContributorInfo } from './options.js'
import type {
GitChangelog,
KnownGitProvider,
MergedRawCommit,
} from './typings.js'
import type { KnownGitProvider, MergedRawCommit } from './typings.js'
import {
getContributorInfo,
getUserNameWithNoreplyEmail,
10 changes: 4 additions & 6 deletions plugins/development/plugin-git/src/node/resolveContributors.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import type { GitContributor } from '../shared/index.js'
import type { ContributorsOptions } from './options.js'
import type {
GitContributor,
KnownGitProvider,
MergedRawCommit,
} from './typings.js'
import type { KnownGitProvider, MergedRawCommit } from './typings.js'
import {
digestSHA256,
getContributorInfo,
@@ -17,7 +14,8 @@ export const getRawContributors = (
): GitContributor[] => {
const contributors = new Map<string, GitContributor>()

for (const commit of commits.reverse()) {
// copy and reverse commits
for (const commit of [...commits].reverse()) {
const authors = [
{ name: commit.author, email: commit.email },
...commit.coAuthors,
77 changes: 1 addition & 76 deletions plugins/development/plugin-git/src/node/typings.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import type { CoAuthorInfo } from '../shared/index.js'
/**
* Git provider
*/
export type KnownGitProvider = 'bitbucket' | 'gitee' | 'github' | 'gitlab'

/**
* Co-author information
*/
export interface CoAuthorInfo {
name: string
email: string
}

export interface RawCommit {
/**
* File path
@@ -54,71 +47,3 @@ export interface RawCommit {
export interface MergedRawCommit extends Omit<RawCommit, 'filepath'> {
filepaths: string[]
}

export interface GitContributor {
/**
* Contributor display name
*/
name: string
/**
* Contributor email
*/
email: string

/**
* Contributor username on the git hosting service
*/
username: string
/**
* Number of commits
*/
commits: number
/**
* Contributor avatar
*/
avatar?: string
/**
* The url of the contributor
*/
url?: string
}

export interface GitChangelog {
/**
* Commit hash
*/
hash: string
/**
* Unix timestamp in milliseconds
*/
date: number
/**
* Commit message
*/
message: string
/**
* The url of the commit
*/
commitUrl?: string
/**
* release tag
*/
tag?: string
/**
* The url of the release tag
*/
tagUrl?: string
/**
* Commit author name
*/
author: string
/**
* Commit author email
*/
email: string

/**
* The co-authors of the commit
*/
coAuthors?: CoAuthorInfo[]
}
3 changes: 2 additions & 1 deletion plugins/development/plugin-git/src/node/utils/getCommits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { execa } from 'execa'
import type { GitContributor } from '../../shared/index.js'
import type { GitPluginOptions } from '../options.js'
import type { GitContributor, MergedRawCommit, RawCommit } from '../typings.js'
import type { MergedRawCommit, RawCommit } from '../typings.js'

const SPLIT_CHAR = '[GIT_LOG_COMMIT_END]'
const RE_SPLIT = /\[GIT_LOG_COMMIT_END\]$/
147 changes: 147 additions & 0 deletions plugins/development/plugin-git/src/shared/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import type { PageFrontmatter } from 'vuepress/shared'

/**
* Co-author information
*/
export interface CoAuthorInfo {
name: string
email: string
}

export interface GitContributor {
/**
* Contributor display name
*/
name: string
/**
* Contributor email
*/
email: string

/**
* Contributor username on the git hosting service
*/
username: string
/**
* Number of commits
*/
commits: number
/**
* Contributor avatar
*/
avatar?: string
/**
* The url of the contributor
*/
url?: string
}

export interface GitChangelog {
/**
* Commit hash
*/
hash: string
/**
* Unix timestamp in milliseconds
*/
date: number
/**
* Commit message
*/
message: string
/**
* The url of the commit
*/
commitUrl?: string
/**
* release tag
*/
tag?: string
/**
* The url of the release tag
*/
tagUrl?: string
/**
* Commit author name
*/
author: string
/**
* Commit author email
*/
email: string

/**
* The co-authors of the commit
*/
coAuthors?: CoAuthorInfo[]
}

export interface GitPluginFrontmatter extends PageFrontmatter {
gitInclude?: string[]

/**
* Whether to get the contributors of a page
*
* - If the value is `false`, it will be ignored
* - If the value is `string[]`, it will be used as the list of extra contributors
*/
contributors?: string[] | boolean

/**
* Whether to get the changelog of a page
*/
changelog?: boolean
}

export interface GitPluginPageData extends Record<string, unknown> {
git: GitData
}

export interface GitData {
/**
* Unix timestamp in milliseconds of the first commit
*/
createdTime?: number

/**
* Unix timestamp in milliseconds of the last commit
*/
updatedTime?: number

/**
* Contributors of all commits
*/
contributors?: GitContributor[]

/**
* Changelog of a page
*/
changelog?: GitChangelog[]
}

export interface GitLocaleData {
/**
* Contributors title
*/
contributors: string

/**
* Changelog title
*/
changelog: string

/**
* Word to represent a commit "on" a time
*/
timeOn: string

/**
* Changelog button
*/
viewChangelog: string

/**
* Latest updated
*/
latestUpdateAt: string
}
3 changes: 2 additions & 1 deletion plugins/development/plugin-git/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@
"extends": "../../../tsconfig.build.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib"
"outDir": "./lib",
"types": ["vuepress/client-types", "vite/client", "webpack-env"]
},
"include": ["./src"]
}
4 changes: 4 additions & 0 deletions plugins/development/plugin-palette/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-palette

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-palette
2 changes: 1 addition & 1 deletion plugins/development/plugin-palette/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-palette",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - palette",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/development/plugin-reading-time/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-reading-time

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-reading-time
2 changes: 1 addition & 1 deletion plugins/development/plugin-reading-time/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-reading-time",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - reading-time",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/development/plugin-rtl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-rtl

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-rtl
2 changes: 1 addition & 1 deletion plugins/development/plugin-rtl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-rtl",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - rtl",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/development/plugin-sass-palette/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-sass-palette

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-sass-palette
2 changes: 1 addition & 1 deletion plugins/development/plugin-sass-palette/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-sass-palette",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - sass-palette",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/development/plugin-toc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-toc

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

### Features
2 changes: 1 addition & 1 deletion plugins/development/plugin-toc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-toc",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - toc",
"keywords": [
"vuepress-plugin",
6 changes: 6 additions & 0 deletions plugins/features/plugin-back-to-top/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Features

- improve rtl support ([#388](https://github.com/vuepress/ecosystem/issues/388)) ([c2a95d4](https://github.com/vuepress/ecosystem/commit/c2a95d4840571996fc9b5504a91dfbecaede4a71))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-back-to-top
2 changes: 1 addition & 1 deletion plugins/features/plugin-back-to-top/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-back-to-top",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - back to top",
"keywords": [
"vuepress-plugin",
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@

.vp-scroll-progress {
position: absolute;
right: -2px;
inset-inline-end: -2px;
bottom: -2px;

width: 52px;
7 changes: 7 additions & 0 deletions plugins/features/plugin-catalog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Features

- improve rtl support ([#388](https://github.com/vuepress/ecosystem/issues/388)) ([c2a95d4](https://github.com/vuepress/ecosystem/commit/c2a95d4840571996fc9b5504a91dfbecaede4a71))
- **plugin-catalog:** prefer rem unit ([cb18654](https://github.com/vuepress/ecosystem/commit/cb18654673b51994a9dae253a6a9070797ea1faa))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-catalog
2 changes: 1 addition & 1 deletion plugins/features/plugin-catalog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-catalog",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - catalog",
"keywords": [
"vuepress-plugin",
17 changes: 11 additions & 6 deletions plugins/features/plugin-catalog/src/client/styles/catalog.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.vp-catalog {
margin-top: 8px;
margin-bottom: 8px;
margin-top: 0.5rem;
margin-bottom: 0.5rem;

&-item {
counter-increment: catalog-item;
@@ -154,9 +154,9 @@
.vp-sub-catalog-link {
display: inline-block;

margin: 4px 8px;
padding: 4px 8px;
border-radius: 6px;
margin: 0.25rem 0.5rem;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;

background-color: var(--catalog-c-control);

@@ -179,7 +179,6 @@

margin-top: 0.125em;
margin-left: -1em;
padding-right: 0;

font-size: 0.85em;
text-decoration: none;
@@ -191,6 +190,12 @@
display: none;
}

[dir='rtl'] & {
float: right;
margin-right: -1em;
margin-left: 0;
}

h2:hover &,
h3:hover & {
text-decoration: none;
4 changes: 4 additions & 0 deletions plugins/features/plugin-copy-code/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-copy-code

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-copy-code
2 changes: 1 addition & 1 deletion plugins/features/plugin-copy-code/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-copy-code",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - copy code block",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/features/plugin-copyright/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-copyright

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-copyright
2 changes: 1 addition & 1 deletion plugins/features/plugin-copyright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-copyright",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - copyright",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/features/plugin-icon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-icon

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-icon
2 changes: 1 addition & 1 deletion plugins/features/plugin-icon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-icon",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - icon",
"keywords": [
"vuepress-plugin",
6 changes: 6 additions & 0 deletions plugins/features/plugin-medium-zoom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Bug Fixes

- **plugin-medium-zoom:** fix onContentUpdate usage ([7b753df](https://github.com/vuepress/ecosystem/commit/7b753df386bd39f3a0c3122abcb01ee1365e7c24))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-medium-zoom
2 changes: 1 addition & 1 deletion plugins/features/plugin-medium-zoom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-medium-zoom",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - medium-zoom",
"keywords": [
"vuepress-plugin",
8 changes: 6 additions & 2 deletions plugins/features/plugin-medium-zoom/src/client/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ZoomOptions } from 'medium-zoom'
import mediumZoom from 'medium-zoom'
import { defineClientConfig, onContentUpdated } from 'vuepress/client'
import { mediumZoomSymbol } from './composables/index.js'
import { mediumZoomSymbol, useMediumZoom } from './composables/index.js'

import './styles/vars.css'
import './styles/medium-zoom.css'
@@ -23,9 +23,13 @@ export default defineClientConfig({
zoom.attach(sel)
}
app.provide(mediumZoomSymbol, zoom)
},

setup() {
const zoom = useMediumZoom()

onContentUpdated((reason) => {
if (reason !== 'beforeUnmount') zoom.refresh()
if (reason !== 'beforeUnmount') zoom!.refresh()
})
},
})
8 changes: 8 additions & 0 deletions plugins/features/plugin-notice/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Features

- improve rtl support ([#388](https://github.com/vuepress/ecosystem/issues/388)) ([c2a95d4](https://github.com/vuepress/ecosystem/commit/c2a95d4840571996fc9b5504a91dfbecaede4a71))
- **plugin-notice:** add markdown format support for notice content, close [#376](https://github.com/vuepress/ecosystem/issues/376) ([#382](https://github.com/vuepress/ecosystem/issues/382)) ([7b7068e](https://github.com/vuepress/ecosystem/commit/7b7068e1c344fe39183208f52fb339cb3b9be946))
- prefer rem unit ([869e08c](https://github.com/vuepress/ecosystem/commit/869e08cdd9a31924663be1000048358e8110b92b))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-notice
3 changes: 2 additions & 1 deletion plugins/features/plugin-notice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-notice",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - back to top",
"keywords": [
"vuepress-plugin",
@@ -40,6 +40,7 @@
"dependencies": {
"@vuepress/helper": "workspace:*",
"@vueuse/core": "^12.7.0",
"chokidar": "^3.6.0",
"vue": "^3.5.13"
},
"peerDependencies": {
24 changes: 4 additions & 20 deletions plugins/features/plugin-notice/src/client/components/Notice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { isLinkAbsolute, isLinkHttp, startsWith } from '@vuepress/helper/client'
import { watchImmediate } from '@vueuse/core'
import type { PropType } from 'vue'
import {
TransitionGroup,
computed,
@@ -10,38 +9,23 @@ import {
ref,
} from 'vue'
import { useRoutePath, useRouter } from 'vuepress/client'
import type { NoticeItemOptions } from '../../shared/index.js'
import { useNoticeOptions } from '../composables/index.js'
import { CloseIcon } from './CloseIcon.js'

import '../styles/notice.css'

type NoticeClientOption = Omit<NoticeItemOptions, 'key'> & {
noticeKey?: string
} & ({ match: string } | { path: string })

export const Notice = defineComponent({
name: 'Notice',

props: {
/**
* Notice locales settings
*
* 通知的多语言设置
*/
config: {
type: Array as PropType<NoticeClientOption[]>,
required: true,
},
},

setup(props) {
setup() {
const router = useRouter()
const routePath = useRoutePath()
const noticeOptions = useNoticeOptions()

const isVisible = ref(false)

const matchedConfig = computed(() => {
const option = props.config.find((item) =>
const option = noticeOptions.value.find((item) =>
'match' in item
? new RegExp(item.match).test(routePath.value)
: startsWith(routePath.value, item.path),
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './useNoticeOptions.js'
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { NOTICE_OPTIONS } from '@internal/noticeOptions'
import type { Ref } from 'vue'
import { ref } from 'vue'
import type { NoticeAttrOptions } from '../../shared/index.js'

declare const __VUE_HMR_RUNTIME__: Record<string, unknown>

export type NoticeOptionsRef = Ref<NoticeAttrOptions[]>

export const noticeOptions: NoticeOptionsRef = ref(
NOTICE_OPTIONS,
) as NoticeOptionsRef

export const useNoticeOptions = (): NoticeOptionsRef => noticeOptions

if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) {
__VUE_HMR_RUNTIME__.updateNoticeOptions = (data: NoticeAttrOptions[]) => {
noticeOptions.value = data
}
}
5 changes: 1 addition & 4 deletions plugins/features/plugin-notice/src/client/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { h } from 'vue'
import { defineClientConfig } from 'vuepress/client'
import type { NoticeAttrOptions } from '../shared/index.js'
import { Notice } from './components/index.js'

import './styles/vars.css'

declare const __NOTICE_OPTIONS__: NoticeAttrOptions[]

export default defineClientConfig({
rootComponents: [() => h(Notice, { config: __NOTICE_OPTIONS__ })],
rootComponents: [() => h(Notice)],
})
1 change: 1 addition & 0 deletions plugins/features/plugin-notice/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/index.js'
export * from './composables/index.js'
5 changes: 5 additions & 0 deletions plugins/features/plugin-notice/src/client/noticeOptions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '@internal/noticeOptions' {
import type { NoticeAttrOptions } from '../shared/index.js'

export const NOTICE_OPTIONS: NoticeAttrOptions[]
}
6 changes: 5 additions & 1 deletion plugins/features/plugin-notice/src/client/styles/notice.scss
Original file line number Diff line number Diff line change
@@ -72,6 +72,10 @@

cursor: pointer;

[dir='rtl'] & {
float: left;
}

&:hover {
background-color: rgb(0 0 0 / 30%);
}
@@ -80,7 +84,7 @@

.vp-notice-content {
margin: 1rem 0.75rem;
font-size: 14px;
font-size: 0.875rem;
line-height: 1.5;
}

Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ export const getNoticeOptions = (
options: NoticeOptions[] = [],
): NoticeAttrOptions[] =>
options
.map(({ key, ...item }) =>
.map(({ key, contentType, contentFile, ...item }) =>
'match' in item
? {
...item,
17 changes: 12 additions & 5 deletions plugins/features/plugin-notice/src/node/noticePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import type { Plugin } from 'vuepress/core'
import { getDirname, logger, path } from 'vuepress/utils'
import { getNoticeOptions } from './getNoticeOptions.js'
import { PLUGIN_NAME } from './logger.js'
import { getDirname, path } from 'vuepress/utils'
import { PLUGIN_NAME, logger } from './logger.js'
import type { NoticePluginOptions } from './options.js'
import {
prepareNoticeOptions,
watchNoticeOptions,
} from './prepareNoticeOptions.js'

const __dirname = import.meta.dirname || getDirname(import.meta.url)

@@ -14,8 +17,12 @@ export const noticePlugin =
return {
name: PLUGIN_NAME,

define: {
__NOTICE_OPTIONS__: getNoticeOptions(options.config),
onPrepared: async () => {
await prepareNoticeOptions(app, options.config)
},

onWatched: (_, watchers) => {
watchers.push(watchNoticeOptions(app, options.config))
},

clientConfigFile: path.resolve(__dirname, '../client/config.js'),
128 changes: 128 additions & 0 deletions plugins/features/plugin-notice/src/node/prepareNoticeOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import fs from 'node:fs/promises'
import type { FSWatcher } from 'chokidar'
import { watch } from 'chokidar'
import type { App } from 'vuepress'
import { path } from 'vuepress/utils'
import type { NoticeOptions } from '../shared/index.js'
import { getNoticeOptions } from './getNoticeOptions.js'

const HMR_CODE = `
if (import.meta.webpackHot) {
import.meta.webpackHot.accept()
if (__VUE_HMR_RUNTIME__.updateNoticeOptions) {
__VUE_HMR_RUNTIME__.updateNoticeOptions(NOTICE_OPTIONS)
}
}
if (import.meta.hot) {
import.meta.hot.accept(({ NOTICE_OPTIONS }) => {
__VUE_HMR_RUNTIME__.updateNoticeOptions(NOTICE_OPTIONS)
})
}
`

const readFile = async (filepath: string): Promise<string> => {
try {
const content = await fs.readFile(filepath, 'utf-8')
return content
} catch {
return ''
}
}

// [filepath]: NoticeOptions
const noticeCache = new Map<string, NoticeOptions>()

const resolveNoticeItem = async (
app: App,
notice: NoticeOptions,
): Promise<NoticeOptions> => {
// eslint-disable-next-line prefer-const
let { contentType = 'html', contentFile, content = '', ...item } = notice

if (contentFile) {
contentFile = path.resolve(contentFile)

if (noticeCache.has(contentFile)) {
return noticeCache.get(contentFile)!
}

contentType = contentFile.endsWith('.md') ? 'markdown' : 'html'
content = await readFile(contentFile)
}

if (contentType === 'markdown') {
content = app.markdown.render(content, {
filePath: contentFile,
})
}

const resolved: NoticeOptions = { content, ...item }

if (contentFile) {
noticeCache.set(contentFile, resolved)
}

return resolved
}

export const prepareNoticeOptions = async (
app: App,
options: NoticeOptions[] = [],
): Promise<void> => {
const noticeOptions: NoticeOptions[] = []

for (const item of options) {
noticeOptions.push(await resolveNoticeItem(app, item))
}

const noticeAttrOptions = getNoticeOptions(noticeOptions)

let content = `\
export const NOTICE_OPTIONS = JSON.parse(${JSON.stringify(
JSON.stringify(noticeAttrOptions),
)})
`
if (app.env.isDev) {
content += HMR_CODE
}

await app.writeTemp('internal/noticeOptions.js', content)
}

export const watchNoticeOptions = (
app: App,
options: NoticeOptions[],
): FSWatcher => {
const filepaths = options
.map(({ contentFile }) => contentFile)
.filter(Boolean) as string[]

const watcher = watch(filepaths, {
ignoreInitial: true,
})

const onChange = async (file: string): Promise<void> => {
const filepath = path.resolve(file)
const cached = noticeCache.get(filepath)

if (cached) {
const contentType = filepath.endsWith('.md') ? 'markdown' : 'html'
const content = await readFile(filepath)
cached.content =
contentType === 'markdown'
? app.markdown.render(content, {
filePath: filepath,
})
: content
}

await prepareNoticeOptions(app, options)
}

watcher.on('change', (filepath: string) => {
void onChange(filepath)
})

return watcher
}
29 changes: 26 additions & 3 deletions plugins/features/plugin-notice/src/shared/notice.ts
Original file line number Diff line number Diff line change
@@ -31,12 +31,32 @@ export interface NoticeItemOptions {
*/
title: string

/**
* Notice content type
*
* 通知内容类型
*
* @default 'html'
*/
contentType?: 'html' | 'markdown'

/**
* Notice content file absolute path, file format should be `.md` or `.html`.
* Prioritize using the file content as `content`.
*
* 通知内容文件绝对路径, 文件格式支持 `.md` 或 `.html`。
* 优先使用文件内容作为 `content`。
*
* @example '/path/to/notice.md'
*/
contentFile?: string

/**
* Notice content
*
* 通知内容
*/
content: string
content?: string

/**
* Notice key
@@ -104,10 +124,13 @@ export interface NoticeMatchOptions extends NoticeItemOptions {

export type NoticeOptions = NoticeMatchOptions | NoticePathOptions
export type NoticeAttrOptions =
| (Omit<NoticeMatchOptions, 'key' | 'match'> & {
| (Omit<
NoticeMatchOptions,
'contentFile' | 'contentType' | 'key' | 'match'
> & {
noticeKey?: string
match: string
})
| (Omit<NoticePathOptions, 'key'> & {
| (Omit<NoticePathOptions, 'contentFile' | 'contentType' | 'key'> & {
noticeKey?: string
})
5 changes: 4 additions & 1 deletion plugins/features/plugin-notice/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,10 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
"types": ["vuepress/client-types", "vite/client", "webpack-env"]
"types": ["vuepress/client-types", "vite/client", "webpack-env"],
"paths": {
"@internal/noticeOptions": ["./src/client/noticeOptions.d.ts"]
}
},
"include": ["./src"],
"references": [{ "path": "../../../tools/helper/tsconfig.build.json" }]
4 changes: 4 additions & 0 deletions plugins/features/plugin-nprogress/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-nprogress

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-nprogress
2 changes: 1 addition & 1 deletion plugins/features/plugin-nprogress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-nprogress",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - nprogress",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/features/plugin-photo-swipe/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-photo-swipe

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-photo-swipe
2 changes: 1 addition & 1 deletion plugins/features/plugin-photo-swipe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-photo-swipe",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - photo-swipe",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/features/plugin-watermark/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-watermark

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-watermark
2 changes: 1 addition & 1 deletion plugins/features/plugin-watermark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-watermark",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - watermark",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-append-date/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-append-date

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-append-date
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-append-date/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-append-date",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - append date",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-links-check/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-links-check

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-links-check
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-links-check/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-links-check",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - links-check",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-markdown-ext/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-markdown-ext

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-ext
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-ext/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-ext",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown extension",
"keywords": [
"vuepress-plugin",
6 changes: 6 additions & 0 deletions plugins/markdown/plugin-markdown-hint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Bug Fixes

- **plugin-markdown-hint:** fix missing `env` in title inline rendering, close [#380](https://github.com/vuepress/ecosystem/issues/380) ([#381](https://github.com/vuepress/ecosystem/issues/381)) ([4270cd9](https://github.com/vuepress/ecosystem/commit/4270cd9e7759eb13ab66a8ad71f6f4a685eae1cf))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-hint
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-hint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-hint",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown hint",
"keywords": [
"vuepress-plugin",
6 changes: 3 additions & 3 deletions plugins/markdown/plugin-markdown-hint/src/node/hint.ts
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ export const hint: PluginWithOptions<MarkdownItHintOptions> = (
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
info = options[localePath]?.[name]
} else {
info = md.renderInline(info)
info = md.renderInline(info, env)
}

return `<div class="hint-container ${name}">\n<p class="hint-container-title">${info || name}</p>\n`
@@ -71,7 +71,7 @@ export const hint: PluginWithOptions<MarkdownItHintOptions> = (
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
info = options[localePath]?.caution
} else {
info = md.renderInline(info)
info = md.renderInline(info, env)
}

return `<div class="hint-container caution">\n<p class="hint-container-title">${
@@ -104,7 +104,7 @@ export const hint: PluginWithOptions<MarkdownItHintOptions> = (
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
info = options[localePath]?.details
} else {
info = md.renderInline(info)
info = md.renderInline(info, env)
}

return `<details class="hint-container details"><summary>${
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-markdown-image/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-markdown-image

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-image
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-image/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-image",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown image",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-markdown-include/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-markdown-include

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-include
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-include/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-include",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown include",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-markdown-math/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-markdown-math

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-math
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-math/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-math",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown math",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-markdown-stylize/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-markdown-stylize

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-stylize
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-stylize/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-stylize",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown stylize",
"keywords": [
"vuepress-plugin",
4 changes: 4 additions & 0 deletions plugins/markdown/plugin-markdown-tab/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

**Note:** Version bump only for package @vuepress/plugin-markdown-tab

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-markdown-tab
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-markdown-tab/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-markdown-tab",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown tab",
"keywords": [
"vuepress-plugin",
6 changes: 6 additions & 0 deletions plugins/markdown/plugin-prismjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Features

- add `codeBlockTitle` option support for highlighter, close [#379](https://github.com/vuepress/ecosystem/issues/379) ([#386](https://github.com/vuepress/ecosystem/issues/386)) ([7535e36](https://github.com/vuepress/ecosystem/commit/7535e36a6289891a004445873c34d0a9531636f0))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-prismjs
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-prismjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-prismjs",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - prismjs",
"keywords": [
"vuepress-plugin",
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Markdown } from 'vuepress/markdown'
import { resolveAttr, resolveLanguage } from '../utils/index.js'
import { resolveLanguage } from '../utils/index.js'

export interface MarkdownItPreWrapperOptions {
/**
@@ -33,12 +33,9 @@ export const preWrapperPlugin = (
const language = resolveLanguage(info)
const languageClass = `${langPrefix}${language.name}`

// resolve title from token info
const title = resolveAttr(info, 'title') ?? language.ext

/**
* Add information to dataset for current code block.
*/
return `<div class="${languageClass}" data-highlighter="prismjs" data-ext="${language.ext}" data-title="${title}">${result.replace(` class="${languageClass}"`, '')}</div>`
return `<div class="${languageClass}" data-highlighter="prismjs" data-ext="${language.ext}">${result.replace(` class="${languageClass}"`, '')}</div>`
}
}
4 changes: 3 additions & 1 deletion plugins/markdown/plugin-prismjs/src/node/options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {
MarkdownItCodeBlockTitleOptions,
MarkdownItCollapsedLinesOptions,
MarkdownItLineNumbersOptions,
} from '@vuepress/highlighter-helper'
@@ -11,7 +12,8 @@ import type { PrismjsHighlightOptions } from './types.js'
/**
* Options of @vuepress/plugin-prismjs
*/
export type PrismjsPluginOptions = MarkdownItLineNumbersOptions &
export type PrismjsPluginOptions = MarkdownItCodeBlockTitleOptions &
MarkdownItLineNumbersOptions &
MarkdownItPreWrapperOptions &
MarkdownItPrismjsHighlightOptions &
Pick<MarkdownItCollapsedLinesOptions, 'collapsedLines'> &
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ export const prepareClientConfigFile = (
lineNumbers = true,
highlightLines = true,
collapsedLines = 'disable',
codeBlockTitle = true,
notationDiff,
notationErrorLevel,
notationFocus,
@@ -88,6 +89,12 @@ export const prepareClientConfigFile = (
setups.push('setupCollapsedLines()')
}

if (codeBlockTitle) {
imports.push(
`import "${getModulePath('@vuepress/highlighter-helper/styles/code-block-title.css', import.meta)}"`,
)
}

let code = imports.join('\n')

if (setups.length) {
12 changes: 11 additions & 1 deletion plugins/markdown/plugin-prismjs/src/node/prismjsPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
codeBlockTitle as codeBlockTitlePlugin,
collapsedLines as collapsedLinesPlugin,
lineNumbers as lineNumbersPlugin,
} from '@vuepress/highlighter-helper'
@@ -15,14 +16,21 @@ export const prismjsPlugin = (options: PrismjsPluginOptions = {}): Plugin => {
preWrapper: true,
lineNumbers: true,
collapsedLines: false,
codeBlockTitle: true,
...options,
}

return {
name: '@vuepress/plugin-prismjs',

extendsMarkdown(md) {
const { preloadLanguages, preWrapper, lineNumbers, collapsedLines } = opt
const {
preloadLanguages,
preWrapper,
lineNumbers,
collapsedLines,
codeBlockTitle,
} = opt

if (preloadLanguages?.length) {
loadLanguages(preloadLanguages)
@@ -40,6 +48,8 @@ export const prismjsPlugin = (options: PrismjsPluginOptions = {}): Plugin => {
md.use(lineNumbersPlugin, { lineNumbers, removeLastLine: true })
if (collapsedLines !== 'disable')
md.use(collapsedLinesPlugin, { collapsedLines, removeLastLine: true })

md.use(codeBlockTitlePlugin, { codeBlockTitle })
}
},

1 change: 0 additions & 1 deletion plugins/markdown/plugin-prismjs/src/node/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './escapeRegExp.js'
export * from './languages.js'
export * from './resolveLanguage.js'
export * from './resolveAttr.js'

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type {
MarkdownItCodeBlockTitleOptions,
MarkdownItCollapsedLinesOptions,
MarkdownItLineNumbersOptions,
} from '@vuepress/highlighter-helper'
import {
codeBlockTitle as codeBlockTitlePlugin,
collapsedLines as collapsedLinesPlugin,
lineNumbers as lineNumbersPlugin,
} from '@vuepress/highlighter-helper'
@@ -22,6 +24,7 @@ const createMarkdown = ({
preWrapper = true,
lineNumbers = true,
collapsedLines = false,
codeBlockTitle = true,
...options
}: PrismjsPluginOptions = {}): MarkdownIt => {
const md = MarkdownIt()
@@ -41,6 +44,9 @@ const createMarkdown = ({
collapsedLines,
removeLastLine: true,
})
md.use<MarkdownItCodeBlockTitleOptions>(codeBlockTitlePlugin, {
codeBlockTitle,
})
}
return md
}
11 changes: 11 additions & 0 deletions plugins/markdown/plugin-revealjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.0.0-rc.81](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.80...v2.0.0-rc.81) (2025-03-04)

### Bug Fixes

- **plugin-revealjs:** improve a11y ([9e917b7](https://github.com/vuepress/ecosystem/commit/9e917b76d1f7edfd98e29a5fa52e0c998fb9e94c))

### Features

- improve rtl support ([#388](https://github.com/vuepress/ecosystem/issues/388)) ([c2a95d4](https://github.com/vuepress/ecosystem/commit/c2a95d4840571996fc9b5504a91dfbecaede4a71))
- prefer rem unit ([869e08c](https://github.com/vuepress/ecosystem/commit/869e08cdd9a31924663be1000048358e8110b92b))

# [2.0.0-rc.80](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.79...v2.0.0-rc.80) (2025-02-24)

**Note:** Version bump only for package @vuepress/plugin-revealjs
2 changes: 1 addition & 1 deletion plugins/markdown/plugin-revealjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/plugin-revealjs",
"version": "2.0.0-rc.80",
"version": "2.0.0-rc.81",
"description": "VuePress plugin - markdown reveals",
"keywords": [
"vuepress-plugin",
Original file line number Diff line number Diff line change
@@ -26,7 +26,8 @@
dl,
ul {
display: inline-block;
margin: 0 0 0 1em;
margin-block: 0;
margin-inline: 1em 0;
text-align: start;
}

@@ -39,7 +40,7 @@
ol ol,
ol ul {
display: block;
margin-left: 40px;
margin-left: 2.5rem;
}

ul {
@@ -59,7 +60,7 @@
}

dd {
margin-left: 40px;
margin-left: 2.5rem;
}

blockquote {
Loading