@frontfactory/vitepress-theme 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/README.md +160 -8
  3. package/config.d.ts +26 -1
  4. package/config.js +165 -21
  5. package/dist/style.css +1 -1
  6. package/node/llms.js +31 -0
  7. package/node/og.js +159 -0
  8. package/node/pages.js +154 -0
  9. package/node/rss.js +81 -0
  10. package/package.json +49 -26
  11. package/src/blog/posts.data.ts +46 -0
  12. package/src/components/FfBackToTop.vue +33 -10
  13. package/src/components/FfBanner.vue +42 -8
  14. package/src/components/FfCopyStatus.vue +64 -0
  15. package/src/components/FfDocMeta.vue +50 -46
  16. package/src/components/FfFeature.vue +18 -7
  17. package/src/components/FfFeedback.vue +96 -0
  18. package/src/components/FfFooter.vue +11 -5
  19. package/src/components/FfHero.vue +20 -10
  20. package/src/components/FfHeroCommand.vue +24 -27
  21. package/src/components/FfHomeSponsors.vue +2 -2
  22. package/src/components/FfNavBarTitle.vue +63 -0
  23. package/src/components/FfPost.vue +49 -0
  24. package/src/components/FfProgress.vue +69 -0
  25. package/src/components/FfVersionSwitcher.vue +20 -0
  26. package/src/composables/blog.ts +38 -0
  27. package/src/composables/options.ts +19 -14
  28. package/src/composables/relativeTime.ts +59 -0
  29. package/src/composables/tabs.ts +155 -0
  30. package/src/content/Api.vue +6 -2
  31. package/src/content/Badge.vue +26 -0
  32. package/src/content/Callout.vue +27 -0
  33. package/src/content/FileTree.vue +118 -0
  34. package/src/content/Tab.vue +11 -0
  35. package/src/content/Tabs.vue +74 -0
  36. package/src/content/Timeline.vue +19 -0
  37. package/src/content/TimelineItem.vue +37 -0
  38. package/src/content/timeline.ts +4 -0
  39. package/src/index.ts +37 -1
  40. package/src/internal.ts +7 -2
  41. package/src/layout/FfBlog.vue +62 -0
  42. package/src/layout/FfLayout.vue +17 -1
  43. package/src/styles/_base.scss +20 -5
  44. package/src/styles/_blocks.scss +25 -1
  45. package/src/styles/_blog.scss +131 -0
  46. package/src/styles/_breakpoints.scss +26 -0
  47. package/src/styles/_code.scss +5 -5
  48. package/src/styles/_content.scss +280 -12
  49. package/src/styles/_doc.scss +18 -5
  50. package/src/styles/_home.scss +37 -17
  51. package/src/styles/_motion.scss +22 -2
  52. package/src/styles/_nav.scss +81 -8
  53. package/src/styles/_print.scss +77 -0
  54. package/src/styles/_sidebar.scss +2 -2
  55. package/src/styles/_tokens.scss +75 -9
  56. package/src/styles/index.scss +2 -0
  57. package/src/types.ts +140 -2
  58. package/types/blog/posts.data.d.ts +14 -0
  59. package/types/components/FfBackToTop.vue.d.ts +3 -0
  60. package/types/components/FfBanner.vue.d.ts +3 -0
  61. package/types/components/FfCopyStatus.vue.d.ts +3 -0
  62. package/types/components/FfDocMeta.vue.d.ts +3 -0
  63. package/types/components/FfFeature.vue.d.ts +13 -0
  64. package/types/components/FfFeedback.vue.d.ts +3 -0
  65. package/types/components/FfFooter.vue.d.ts +3 -0
  66. package/types/components/FfHero.vue.d.ts +42 -0
  67. package/types/components/FfHeroCommand.vue.d.ts +9 -0
  68. package/types/components/FfHomeSponsors.vue.d.ts +19 -0
  69. package/types/components/FfNavBarTitle.vue.d.ts +17 -0
  70. package/types/components/FfPost.vue.d.ts +3 -0
  71. package/types/components/FfProgress.vue.d.ts +3 -0
  72. package/types/components/FfVersionSwitcher.vue.d.ts +3 -0
  73. package/types/composables/blog.d.ts +10 -0
  74. package/types/composables/link.d.ts +12 -0
  75. package/types/composables/options.d.ts +15 -0
  76. package/types/composables/relativeTime.d.ts +2 -0
  77. package/types/composables/tabs.d.ts +15 -0
  78. package/types/content/Api.vue.d.ts +27 -0
  79. package/types/content/Badge.vue.d.ts +21 -0
  80. package/types/content/Callout.vue.d.ts +24 -0
  81. package/types/content/Card.vue.d.ts +23 -0
  82. package/types/content/CardGrid.vue.d.ts +20 -0
  83. package/types/content/FileTree.vue.d.ts +6 -0
  84. package/types/content/Kbd.vue.d.ts +15 -0
  85. package/types/content/Steps.vue.d.ts +15 -0
  86. package/types/content/Tab.vue.d.ts +19 -0
  87. package/types/content/Tabs.vue.d.ts +7 -0
  88. package/types/content/Timeline.vue.d.ts +21 -0
  89. package/types/content/TimelineItem.vue.d.ts +21 -0
  90. package/types/content/timeline.d.ts +3 -0
  91. package/types/index.d.ts +25 -0
  92. package/types/internal.d.ts +9 -0
  93. package/types/layout/FfBlog.vue.d.ts +3 -0
  94. package/types/layout/FfLayout.vue.d.ts +23 -0
  95. package/types/types.d.ts +256 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,214 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
+
5
+ ## [1.8.0](https://github.com/front-factory/vitepress-theme/compare/v1.7.0...v1.8.0) (2026-11-04)
6
+
7
+ ### Features
8
+
9
+ * **blog:** add a blog layout with rss feed ([6025542](https://github.com/front-factory/vitepress-theme/commit/60255428b91af2591e48f597c688b9be16547b89))
10
+ * **build:** generate llms.txt ([667dbda](https://github.com/front-factory/vitepress-theme/commit/667dbdaa1e4e8685aff3cda9fe1e01b5a441f24d))
11
+ * **build:** generate open graph images ([b6c2491](https://github.com/front-factory/vitepress-theme/commit/b6c249178798df1cadda134505e009d02d25a47a))
12
+ * **content:** add a Callout component ([928e3b0](https://github.com/front-factory/vitepress-theme/commit/928e3b0400e6ee2ab21e0851211270c647f18eab))
13
+ * **content:** add a FileTree component ([00fca33](https://github.com/front-factory/vitepress-theme/commit/00fca331a234b7d038efe490a52c37496387ab3c))
14
+ * **content:** add new, beta, deprecated and since badge variants ([f252ec6](https://github.com/front-factory/vitepress-theme/commit/f252ec640c34bb3fdb361ab8925fcf873b17c397))
15
+ * **content:** add Tabs and Tab components ([ecb0aff](https://github.com/front-factory/vitepress-theme/commit/ecb0aff234c620d927832e1d93f8ed77b994dada))
16
+ * **content:** add Timeline and TimelineItem components ([0ed25c0](https://github.com/front-factory/vitepress-theme/commit/0ed25c0e8f38f5226871178f33b5c31fbe898436))
17
+ * **doc:** add a copy-as-markdown button ([5de1450](https://github.com/front-factory/vitepress-theme/commit/5de1450a835b17ac42eb71f812569cb8755d12f2))
18
+ * **doc:** add a page feedback widget ([4efd586](https://github.com/front-factory/vitepress-theme/commit/4efd5861312f3d23f4e7926cb3c3940ddf5df072))
19
+ * **i18n:** route banner CTA and API tags through theme labels ([cfff3f9](https://github.com/front-factory/vitepress-theme/commit/cfff3f9408bbd59a376e454f3ed8abaa3ab3f024))
20
+ * **layout:** add a reading progress bar ([e524519](https://github.com/front-factory/vitepress-theme/commit/e5245199deb281c0e3101569d9be7a30cb4a6d83))
21
+ * **layout:** add a wide doc layout ([2cf68f8](https://github.com/front-factory/vitepress-theme/commit/2cf68f89dbb0c7ce6b0295fddf4b5ba3a4b9b276))
22
+ * **nav:** add a version switcher ([fd26deb](https://github.com/front-factory/vitepress-theme/commit/fd26deb1d3bd56950518485d1166416bca4d328a))
23
+ * **styles:** add print styles ([2ff9899](https://github.com/front-factory/vitepress-theme/commit/2ff9899f6c88c7c337dfd06d30145a12def94a65))
24
+ * **theme:** add accent presets ([97c38cc](https://github.com/front-factory/vitepress-theme/commit/97c38cc382045b2a3c62f09b4b06f920ac203d39))
25
+ * **timeline:** add a level prop for entry headings ([82476b9](https://github.com/front-factory/vitepress-theme/commit/82476b9a94f1e92c7c638e1dc3665af0400e2e7c))
26
+ * **tokens:** add an enter duration token for the hero animation ([13d9e19](https://github.com/front-factory/vitepress-theme/commit/13d9e19875075e3734a8c725751b25dded21020d))
27
+
28
+ ### Bug Fixes
29
+
30
+ * **a11y:** announce code block copies to screen readers ([83b45a3](https://github.com/front-factory/vitepress-theme/commit/83b45a38c83ecc2651b647afba56a4184829116d))
31
+ * **a11y:** expose the hero command switcher as tabs ([90bd51c](https://github.com/front-factory/vitepress-theme/commit/90bd51c25b4ae75f4d9ea749456067380cbec6ce))
32
+ * **a11y:** hand focus to the skip link when the banner is dismissed ([4c455f5](https://github.com/front-factory/vitepress-theme/commit/4c455f58de5b9247adcb1fd596899aed207254ba))
33
+ * **a11y:** include the current version in the version switcher name ([73ef48b](https://github.com/front-factory/vitepress-theme/commit/73ef48be2c306bd9086fda0ac4a01216d34956b9))
34
+ * **a11y:** link only the feature title, stretched over the card ([d55d946](https://github.com/front-factory/vitepress-theme/commit/d55d946c302273d27fc22ce2632da1dc9eff01fb))
35
+ * **a11y:** make doc link underline visible by default ([a45d78c](https://github.com/front-factory/vitepress-theme/commit/a45d78c539c0689d0962a1154ab0d96e887f900d))
36
+ * **a11y:** move focus to the thank-you line after a feedback vote ([990577b](https://github.com/front-factory/vitepress-theme/commit/990577b70d3f2a08485adbdb32a7c7ea0bb31955))
37
+ * align vite peer range with the one vitepress 2 requires ([e5da335](https://github.com/front-factory/vitepress-theme/commit/e5da3351a7106fd7ba9a0bb464be778dff192289))
38
+ * **blog:** annotate posts loader type to fix declaration build ([5a422c3](https://github.com/front-factory/vitepress-theme/commit/5a422c37002d7df04d87adc254e344109b5d7b1c))
39
+ * **code:** keep removed diff lines at full opacity for contrast ([0d1956c](https://github.com/front-factory/vitepress-theme/commit/0d1956cee66bc93e1369f8991b610ea796a26b92))
40
+ * **code:** keep the copy button fully opaque for non-text contrast ([a94e45b](https://github.com/front-factory/vitepress-theme/commit/a94e45b5b38f3482e9a09a7727e22394468542f7))
41
+ * **dark:** add shadow tokens with a dark scheme variant ([742b858](https://github.com/front-factory/vitepress-theme/commit/742b8584736088ff339cd4fdceed6bf11d3bb8ed))
42
+ * make vite a required peer dependency ([08b0df4](https://github.com/front-factory/vitepress-theme/commit/08b0df4f436b696ded556a6192874013fc426797))
43
+ * **motion:** honour reduced motion on the nav underline ([cf70693](https://github.com/front-factory/vitepress-theme/commit/cf706934a8295e1cac2b3f770b992cbf62fb6c49))
44
+ * observe banner height when it mounts after the layout ([27949c6](https://github.com/front-factory/vitepress-theme/commit/27949c6b14dda17b53a716f8dd4fd989d44a72af))
45
+ * resolve hero, banner and sponsors links against site base ([2f1ed04](https://github.com/front-factory/vitepress-theme/commit/2f1ed043c7b653e2a632cb495f362896a8886f41))
46
+ * **responsive:** align content breakpoints on 640px without overlap ([66d5e34](https://github.com/front-factory/vitepress-theme/commit/66d5e34032a9e5c4cfa061c390de0041a197f1ab))
47
+ * ship generated type declarations instead of raw sources ([6aafc8d](https://github.com/front-factory/vitepress-theme/commit/6aafc8d11184f58fd90f7fbbcb161580ca4fa127))
48
+
49
+ ### Performance
50
+
51
+ * only listen to scroll and measure the page when their option is on ([9a14af7](https://github.com/front-factory/vitepress-theme/commit/9a14af7a9397572eba7478726185145e9d634716))
52
+ * render the hero image slot once per render ([684d78e](https://github.com/front-factory/vitepress-theme/commit/684d78e8e35b29c002be0ccd0ca125cbb1dca2dc))
53
+ * stop the hero glow animation while the glow is disabled ([2ea95f5](https://github.com/front-factory/vitepress-theme/commit/2ea95f556cf9966b348b3c81f780297d93b6ea8d))
54
+
55
+ ### Dependencies
56
+
57
+ * **deps:** add feed as an optional peer dependency ([198d81e](https://github.com/front-factory/vitepress-theme/commit/198d81e9d44eba4c92e39b0c4f468f7c85262822))
58
+ * **deps:** add satori and resvg as optional peer dependencies ([5e8fefa](https://github.com/front-factory/vitepress-theme/commit/5e8fefa242b8b0b870e30af22294ee7f72aa840c))
59
+
60
+ ## [1.7.0](https://github.com/front-factory/vitepress-theme/compare/v1.6.0...v1.7.0) (2026-10-11)
61
+
62
+ ### Features
63
+
64
+ * **a11y:** support forced colours ([391e35c](https://github.com/front-factory/vitepress-theme/commit/391e35cd8fc65a7638acf5d5fddefdda003764ab))
65
+
66
+ ### Bug Fixes
67
+
68
+ * **a11y:** honour reduced motion on the remaining transitions ([a3529d7](https://github.com/front-factory/vitepress-theme/commit/a3529d783851719230601b5832bb08fffd6de21e))
69
+ * **a11y:** label the hero install group and drop its aside landmark ([1d303e2](https://github.com/front-factory/vitepress-theme/commit/1d303e2dc41bc95ee44beabb205eec4c0d9681a2))
70
+ * **a11y:** name footer navs and announce links opening in a new tab ([5c18122](https://github.com/front-factory/vitepress-theme/commit/5c18122a18be72c1e25233f2d08564929ff7cb27))
71
+ * **a11y:** raise the contrast of the faint ink token ([0e5a4fe](https://github.com/front-factory/vitepress-theme/commit/0e5a4fe5b604ef05c0baa362cc6502c4b9d08981))
72
+ * **back-to-top:** throttle scroll and respect reduced motion ([8549fc5](https://github.com/front-factory/vitepress-theme/commit/8549fc523414b4347d837cb43d0b17670dd2beb6))
73
+ * **banner:** enlarge and centre the dismiss button ([f9043c6](https://github.com/front-factory/vitepress-theme/commit/f9043c642633b06cbdde0c4a298995df476bfedf))
74
+ * **banner:** survive unavailable localStorage ([4a317f2](https://github.com/front-factory/vitepress-theme/commit/4a317f27147818b14f0e7d862071937effc2fa78))
75
+ * **doc-meta:** mark the last-updated stamp up as a time element ([303459f](https://github.com/front-factory/vitepress-theme/commit/303459fcebaa1688df122300a8f3041925f086da))
76
+ * **hero:** handle clipboard failure and announce the copy ([d2a29c1](https://github.com/front-factory/vitepress-theme/commit/d2a29c1e4cd67cac04b1942e4015e8ad1d6f94b3))
77
+
78
+ ## [1.6.0](https://github.com/front-factory/vitepress-theme/compare/v1.5.3...v1.6.0) (2026-09-13)
79
+
80
+ ### Features
81
+
82
+ * **playground:** add a custom 404 page ([fc08f30](https://github.com/front-factory/vitepress-theme/commit/fc08f303a6713102490d29f48bf1f871722eee7d))
83
+ * **playground:** add a team page ([5098161](https://github.com/front-factory/vitepress-theme/commit/50981617a5fd108b22ccfa6cab29ac940dc32119))
84
+ * **playground:** demonstrate VPDocAsideSponsors in the doc aside ([d4af98a](https://github.com/front-factory/vitepress-theme/commit/d4af98a3a28d9b9147918b0ba32e423da94463e5))
85
+ * **playground:** reach the team page from the top nav ([b948cad](https://github.com/front-factory/vitepress-theme/commit/b948cad271c0707030b4bc7f88025645a4b44d9b))
86
+
87
+ ### Bug Fixes
88
+
89
+ * **sidebar:** center a level-0 caret with the label it collapses ([bfb7dac](https://github.com/front-factory/vitepress-theme/commit/bfb7dac6e4173136333f1277cd55759940eb3fe5))
90
+ * **sidebar:** distinguish a nested group heading from a real link ([16217ae](https://github.com/front-factory/vitepress-theme/commit/16217ae8d986e1fbc2cb98658edceeb8c415caae))
91
+
92
+ ## [1.5.3](https://github.com/front-factory/vitepress-theme/compare/v1.5.2...v1.5.3) (2026-09-12)
93
+
94
+ ### Bug Fixes
95
+
96
+ * **config:** escape the banner id before inlining it into the head script ([a1e22a4](https://github.com/front-factory/vitepress-theme/commit/a1e22a489663fcf787838f86fa344ca3433e838e))
97
+ * **feature:** hide the decorative icon from assistive tech ([835b418](https://github.com/front-factory/vitepress-theme/commit/835b4180846097c2ae1ae7739e231595e66f37a8))
98
+ * **hero-command:** clear the copy-feedback timer on unmount ([c8bbe2f](https://github.com/front-factory/vitepress-theme/commit/c8bbe2f5a126d0550237a0b7ee9674b186a25fe2))
99
+
100
+ ## [1.5.2](https://github.com/front-factory/vitepress-theme/compare/v1.5.1...v1.5.2) (2026-09-12)
101
+
102
+ ### Bug Fixes
103
+
104
+ * **release:** add a Performance changelog section for perf commits ([26044d2](https://github.com/front-factory/vitepress-theme/commit/26044d2e6536dee315c90ee30bb9247867b7287d))
105
+
106
+ ## [1.5.1](https://github.com/front-factory/vitepress-theme/compare/v1.5.0...v1.5.1) (2026-09-12)
107
+
108
+ ### Performance
109
+
110
+ * **build:** compress the published stylesheet ([8c0e56c](https://github.com/front-factory/vitepress-theme/commit/8c0e56c6e3a47aeced17f99933dc936df65bcfa3))
111
+
112
+ ## [1.5.0](https://github.com/front-factory/vitepress-theme/compare/v1.4.2...v1.5.0) (2026-09-11)
113
+
114
+ ### Features
115
+
116
+ * **home:** add a themed sponsors section ([fb8c3db](https://github.com/front-factory/vitepress-theme/commit/fb8c3db346749c9a55cb45172c837b08dcf55119))
117
+
118
+ ## [1.4.2](https://github.com/front-factory/vitepress-theme/compare/v1.4.1...v1.4.2) (2026-09-11)
119
+
120
+ ### Bug Fixes
121
+
122
+ * **config:** extend Vite's fs.allow instead of replacing it ([30fdf17](https://github.com/front-factory/vitepress-theme/commit/30fdf17043d6bf41d68bed9bc497f0589f09b926))
123
+
124
+ ## [1.4.1](https://github.com/front-factory/vitepress-theme/compare/v1.4.0...v1.4.1) (2026-09-11)
125
+
126
+ ### Bug Fixes
127
+
128
+ * **home:** drop the hero meta strip's top margin ([9d748c4](https://github.com/front-factory/vitepress-theme/commit/9d748c4b23fc26218a64768f87810fd7ef3708f8))
129
+
130
+ ## [1.4.0](https://github.com/front-factory/vitepress-theme/compare/v1.3.2...v1.4.0) (2026-09-11)
131
+
132
+ ### Features
133
+
134
+ * **theme:** add ff.navSticky option to un-fix the nav and banner ([6d82b32](https://github.com/front-factory/vitepress-theme/commit/6d82b3266240e86357599ff28f768275735e5482))
135
+
136
+ ### Bug Fixes
137
+
138
+ * **home:** shrink the features section's top/bottom padding ([4d9886d](https://github.com/front-factory/vitepress-theme/commit/4d9886dc5142249f85aae6a4663cb7f8f5b07763))
139
+
140
+ ## [1.3.2](https://github.com/front-factory/vitepress-theme/compare/v1.3.1...v1.3.2) (2026-09-11)
141
+
142
+ ### Bug Fixes
143
+
144
+ * **home:** even hero top spacing, top-align columns when uneven height ([2d8dd0a](https://github.com/front-factory/vitepress-theme/commit/2d8dd0a1e05c07abe8d42a10518a0e25299390df))
145
+
146
+ ## [1.3.1](https://github.com/front-factory/vitepress-theme/compare/v1.3.0...v1.3.1) (2026-09-11)
147
+
148
+ ### Bug Fixes
149
+
150
+ * **home:** tighten hero top spacing and drop grey band in ragged feature rows ([0edfcc3](https://github.com/front-factory/vitepress-theme/commit/0edfcc30aeca60aa8055f5fa0c2db4a01fac283a))
151
+
152
+ ## [1.3.0](https://github.com/front-factory/vitepress-theme/compare/v1.2.0...v1.3.0) (2026-09-10)
153
+
154
+ ### Features
155
+
156
+ * **hero:** support command tabs and a bare install panel ([6abb42c](https://github.com/front-factory/vitepress-theme/commit/6abb42ccbab64fd077b6d089e7d50be6f0bab4e1))
157
+
158
+ ## [1.2.0](https://github.com/front-factory/vitepress-theme/compare/v1.1.0...v1.2.0) (2026-09-10)
159
+
160
+ ### Features
161
+
162
+ * **banner:** add a rainbow variant ([8f92631](https://github.com/front-factory/vitepress-theme/commit/8f92631b2bfc6ce5cc80781a30230ba154616dba))
163
+ * **banner:** add variant, gradient and icon options ([c7894c2](https://github.com/front-factory/vitepress-theme/commit/c7894c2f36fbd4c75faeb2822354815b3185fc56))
164
+ * **footer:** pin a social column to the right of the link columns ([56db5b0](https://github.com/front-factory/vitepress-theme/commit/56db5b0608754c17b60aa6e72c25310ccec81819))
165
+ * **hero:** add hero.quote ([672d2c3](https://github.com/front-factory/vitepress-theme/commit/672d2c325464210adec53fca8c170b0933ea4559))
166
+ * **hero:** keep the install panel when the hero has an image ([ee8ed76](https://github.com/front-factory/vitepress-theme/commit/ee8ed76f39bdf46c9fffb56f1ac61e24a789d08a))
167
+ * **nav:** add an option to put the menu before the search box ([f25c5d2](https://github.com/front-factory/vitepress-theme/commit/f25c5d21a2ea96bb028b49bb34601f6743b13b1e))
168
+ * **playground:** derive the displayed version from package.json ([3758539](https://github.com/front-factory/vitepress-theme/commit/37585394f9d560f58a1f53581ba25ca32b59c35e))
169
+
170
+ ### Bug Fixes
171
+
172
+ * **code:** give error/warning/diff line annotations a visible mark ([d4ae4dd](https://github.com/front-factory/vitepress-theme/commit/d4ae4dd8a24843608764d53960ca1c612cd7ab9e))
173
+
174
+ ## [1.1.0](https://github.com/front-factory/vitepress-theme/compare/v1.0.0...v1.1.0) (2026-09-10)
175
+
176
+ ### Features
177
+
178
+ * **home:** drop the accent mark from the hero kicker ([ba519ab](https://github.com/front-factory/vitepress-theme/commit/ba519ab5df9778c6db9890a3fdedd22affb842ca))
179
+ * **home:** tighten the hero headline ([3e92837](https://github.com/front-factory/vitepress-theme/commit/3e92837098c5e689f17b4ddd0bd953f739a55cb4))
180
+ * **home:** turn the hero glow off by default ([a520b78](https://github.com/front-factory/vitepress-theme/commit/a520b781f1f5d2c052ad8605fc973f51d8e74142))
181
+
182
+ ## 1.0.0 (2026-09-10)
183
+
184
+ ### ⚠ BREAKING CHANGES
185
+
186
+ * **config:** extendConfig() is replaced by a default-exported config
187
+ object, consumed via defineConfig({ extends: baseConfig, ... }) as documented
188
+ at https://vitepress.dev/guide/custom-theme#distributing-a-custom-theme. The
189
+ banner anti-flash script now injects through the transformHead build hook
190
+ instead of a config mutation.
191
+
192
+ ### refactor
193
+
194
+ * **config:** switch /config to extends per VitePress docs ([c15d573](https://github.com/front-factory/vitepress-theme/commit/c15d57332bbaf697b7768991494fefb7c9025137))
195
+
196
+ ### Features
197
+
198
+ * **doc:** set the standfirst at body size ([7ca7021](https://github.com/front-factory/vitepress-theme/commit/7ca7021ec8d5e4b512ddbbd973b8c14bb9368b50))
199
+ * editorial vitepress theme ([b9c087f](https://github.com/front-factory/vitepress-theme/commit/b9c087f5fa5182e312ee7529f65123290185873f))
200
+ * **home:** give the hero a second column and a colophon ([1394bee](https://github.com/front-factory/vitepress-theme/commit/1394bee297b51bff6fd54693728a6c4f34c63494))
201
+ * **home:** set the hero in uppercase mono ([c647fd5](https://github.com/front-factory/vitepress-theme/commit/c647fd501096137dd4f653d56fd681649e7a923b))
202
+ * **i18n:** move the theme's own strings into themeConfig.ff.labels ([51fcbda](https://github.com/front-factory/vitepress-theme/commit/51fcbdaa7ab23e740db8a984f189a25287a53877))
203
+ * **layout:** one content band for every page ([f2b295d](https://github.com/front-factory/vitepress-theme/commit/f2b295dcdc2a9c167db13bcfb262362e51e75a9a))
204
+ * **motion:** add light and movement ([420d6cf](https://github.com/front-factory/vitepress-theme/commit/420d6cfdc74bdf109b109b2c7a6b352c4ddef824))
205
+ * **sidebar:** drop the group headings to the label size ([fa07db1](https://github.com/front-factory/vitepress-theme/commit/fa07db1977406b0500c0e2d60e6faf9ccaa255a4))
206
+ * **sidebar:** give the navigation room to read ([11c3d34](https://github.com/front-factory/vitepress-theme/commit/11c3d3433ceb76b3765696225f8bbee215357e22))
207
+ * **sidebar:** tighten the navigation column ([76f1e2b](https://github.com/front-factory/vitepress-theme/commit/76f1e2b48cc219ecb3ea98cf329fdc8afa7d454a))
208
+ * **type:** bring the headline sizes down a step ([82da285](https://github.com/front-factory/vitepress-theme/commit/82da285615e8a6e61e06aed013f65cf90084a450))
209
+ * **type:** take the page title down another step ([201f95a](https://github.com/front-factory/vitepress-theme/commit/201f95a4dc8426ca3b29090dfe47f017ead7304b))
210
+
211
+ ### Bug Fixes
212
+
213
+ * **doc:** align the heading anchors with their headings ([1b14a83](https://github.com/front-factory/vitepress-theme/commit/1b14a83b0ac3ad424e3d710c8ef536304bfbbbb3))
214
+ * settle hover, the hero offsets and the banner ([223f2df](https://github.com/front-factory/vitepress-theme/commit/223f2df4a5156d28c87168d1320ff68be48883a0))
package/README.md CHANGED
@@ -50,12 +50,19 @@ export default Theme
50
50
 
51
51
  `extends: baseConfig` is required: it swaps the components the theme replaces, keeps the package out
52
52
  of dependency pre-bundling, and injects the inline script that keeps a dismissed banner from
53
- painting in the built site.
53
+ painting in the built site, and reads each page's source for the copy-as-Markdown button.
54
+
55
+ The package ships its Vue and TypeScript sources as-is (`main`, `module` and `types` point at
56
+ `src/index.ts`) and relies on Vite to compile them, which `extends: baseConfig` sets up. Tooling that
57
+ type-checks outside Vite, such as `vue-tsc`, may need `skipLibCheck`. Importing
58
+ `@frontfactory/vitepress-theme/config` from `.vitepress/config.ts`, as above, also makes
59
+ `themeConfig.ff` known to TypeScript. `@frontfactory/vitepress-theme/style.css` is exported for
60
+ tooling that needs the stylesheet on its own; the theme entry already imports it.
54
61
 
55
62
  ## Rebranding
56
63
 
57
64
  Every value is a `--ff-*` custom property. Point the accent at your own colour and the whole site
58
- follows.
65
+ follows. For a ready-made accent instead, set `themeConfig.ff.preset` (see [Options](#options)).
59
66
 
60
67
  ```css
61
68
  /* .vitepress/theme/custom.css, imported after the theme */
@@ -92,6 +99,8 @@ follows.
92
99
  | `--ff-radius-sm` / `-md` | Corner radii |
93
100
  | `--ff-rule-width` / `--ff-rule-accent-width` | Rule weights |
94
101
  | `--ff-hero-glow-opacity` | Hero light washes, `0` (off) by default |
102
+ | `--ff-motion-duration` / `-slow` / `-enter` | Hover, slow and hero entrance timings |
103
+ | `--ff-motion-ease` | Easing shared by every transition |
95
104
 
96
105
  `dist/style.css` lists them all, grouped, at the top of the file.
97
106
 
@@ -118,6 +127,14 @@ themeConfig: {
118
127
  // effect on the mobile bar, which always falls back to the hamburger.
119
128
  navOrder: 'search-first',
120
129
 
130
+ // Pins the top bar while scrolling. Set to false to have the bar, and the banner above
131
+ // it, scroll away with the page.
132
+ navSticky: true,
133
+
134
+ // Ready-made accent for both schemes instead of the default indigo:
135
+ // 'emerald' | 'crimson' | 'violet' | 'amber'. Set on <html> before the first paint.
136
+ preset: 'emerald',
137
+
121
138
  // Kicker printed above every page title. Set to false to drop it.
122
139
  meta: {
123
140
  section: true, // section name, read from the sidebar
@@ -134,13 +151,55 @@ themeConfig: {
134
151
  // Column of `themeConfig.socialLinks` icons, pinned to the right of those columns.
135
152
  footerSocial: true,
136
153
 
137
- backToTop: true
154
+ backToTop: true,
155
+
156
+ // Thin reading-progress bar at the very top of the viewport. Off by default.
157
+ progress: true,
158
+
159
+ // "Was this page helpful?" widget under each doc page. `true`, or an object: `url` receives
160
+ // each vote through `navigator.sendBeacon`, `question` replaces the label. Every vote is
161
+ // also dispatched on `window` as an `ff:feedback` event.
162
+ feedback: { url: 'https://example.com/feedback' },
163
+
164
+ // "Copy as Markdown" button in the page kicker. Needs `ffTransformPageData`, see below.
165
+ copyMarkdown: true,
166
+
167
+ // Writes llms.txt and llms-full.txt at the end of the build. Needs `ffBuildEnd`, see below.
168
+ llms: true,
169
+
170
+ // Blog: `layout: blog` on the index page, a dated header on each post, an RSS feed.
171
+ blog: {
172
+ dir: 'blog', // default
173
+ authors: { ada: { name: 'Ada Lovelace', link: 'https://example.com/ada' } },
174
+ rss: { hostname: 'https://example.com' } // or true with `sitemap.hostname`
175
+ },
176
+
177
+ // Open Graph image per page (needs fonts) plus the og:* and twitter:card tags.
178
+ og: {
179
+ hostname: 'https://example.com', // else `sitemap.hostname`
180
+ fonts: [{ name: 'JetBrains Mono', path: 'fonts/JetBrainsMono-Bold.ttf', weight: 700 }]
181
+ },
182
+
183
+ // Version menu beside the site name; each item links to that version's docs.
184
+ versions: {
185
+ current: 'v2',
186
+ items: [{ text: 'v1', link: 'https://v1.example.com' }]
187
+ }
138
188
  }
139
189
  }
140
190
  ```
141
191
 
142
- Per page, `docMeta: false` in the frontmatter drops the kicker, and `section: Guide` overrides the
143
- section name.
192
+ Per page, `docMeta: false` in the frontmatter drops the kicker, `section: Guide` overrides the
193
+ section name, `progress: false` hides the progress bar, `feedback: false` hides the feedback widget, and `wide: true` widens the text column to the full
194
+ band and hides the outline (wide tables, API listings).
195
+
196
+ A vote is sent as the JSON string `{ page, value, lang }` (`value` is `'yes'` or `'no'`, `page` the
197
+ source path), and also fires `ff:feedback` on `window` with that object in `detail`, so a site can
198
+ forward it to its own analytics:
199
+
200
+ ```ts
201
+ window.addEventListener('ff:feedback', (event) => console.log(event.detail))
202
+ ```
144
203
 
145
204
  Banner text, hero title/tagline/quote, feature title/details, footer message/copyright and card icon
146
205
  all render as HTML (`v-html`), not escaped text — a `<strong>` or a hand-written `<a>` in any of them
@@ -149,6 +208,84 @@ from whoever writes `themeConfig.ff` in the VitePress config, not from a reader,
149
208
  field someone else can edit. If a site ever pipes such input into these fields, sanitize it before it
150
209
  reaches the config — the theme does not.
151
210
 
211
+ ### Copy as Markdown
212
+
213
+ `copyMarkdown` puts a button in the kicker that copies the page's Markdown source, frontmatter
214
+ removed. The source is read at build time by `ffTransformPageData`, which `extends: baseConfig`
215
+ already wires in. VitePress replaces a hook declared by the site instead of merging it, so a site
216
+ with its own `transformPageData` calls the helper from it and returns the result:
217
+
218
+ ```ts
219
+ import baseConfig, { ffTransformPageData } from '@frontfactory/vitepress-theme/config'
220
+
221
+ export default defineConfig({
222
+ extends: baseConfig,
223
+ transformPageData(pageData, ctx) {
224
+ // ...your own changes to pageData...
225
+
226
+ return ffTransformPageData(pageData, ctx)
227
+ }
228
+ })
229
+ ```
230
+
231
+ Without the option the helper does nothing, so no source text reaches the bundle.
232
+
233
+ ### llms.txt
234
+
235
+ `llms: true` writes `llms.txt` (an index of the pages) and `llms-full.txt` (their Markdown) to the
236
+ output directory. Links are absolute when `sitemap.hostname` is set. `404.md` and pages with
237
+ `llms: false` in their frontmatter are skipped.
238
+
239
+ The files come from `ffBuildEnd`, wired in by `extends: baseConfig`. A site with its own `buildEnd`
240
+ (or `transformHead`) calls the helper from it, as for `ffTransformPageData`:
241
+
242
+ ```ts
243
+ import baseConfig, { ffBuildEnd } from '@frontfactory/vitepress-theme/config'
244
+
245
+ export default defineConfig({
246
+ extends: baseConfig,
247
+ async buildEnd(siteConfig) {
248
+ await ffBuildEnd(siteConfig)
249
+ }
250
+ })
251
+ ```
252
+
253
+ ### Blog
254
+
255
+ Posts are Markdown pages under `blog.dir` (default `blog`) with a `date`. The index page, `blog/index.md`,
256
+ uses `layout: blog` and lists them newest first; each post gets a header with its date, author and tags.
257
+
258
+ ```md
259
+ ---
260
+ title: Hello, editorial
261
+ date: 2026-10-12
262
+ author: ada # a key of blog.authors, or a plain name
263
+ tags: [theme, design]
264
+ excerpt: Shown in the list and in the feed.
265
+ ---
266
+ ```
267
+
268
+ `rss` writes `feed.xml` at the end of the build (through `ffBuildEnd`) and adds the
269
+ `<link rel="alternate">` tag through `ffTransformHead`. It needs the optional peer dependency
270
+ `feed` (`npm install feed`) and an absolute address: `rss.hostname`, else `sitemap.hostname`.
271
+
272
+ ### Open Graph images
273
+
274
+ `og` draws a 1200x630 PNG for each page into `og/` at the end of the build, and adds `og:image`,
275
+ `og:title`, `og:description` and `twitter:card: summary_large_image` to the page head
276
+ (`ffBuildEnd` and `ffTransformHead`). A page opts out with `og: false` in its frontmatter.
277
+
278
+ It needs the optional peer dependencies `satori` and `@resvg/resvg-js` (`npm install satori @resvg/resvg-js`),
279
+ at least one font file (TTF, OTF or WOFF, not WOFF2; `path` is relative to the source directory, the first
280
+ font of the list sets the family), and an absolute address (`og.hostname`, else `sitemap.hostname`).
281
+ `true` alone is rejected for lack of a font.
282
+
283
+ ## Printing
284
+
285
+ No option needed. Printing a page drops the navigation, sidebar, outline, banner, back-to-top
286
+ control, progress bar, feedback widget and previous/next links, forces the light palette (code
287
+ included) even in dark mode, and prints the address after each external link.
288
+
152
289
  ## Translating
153
290
 
154
291
  Every string the theme adds sits in `themeConfig.ff.labels`, so it is translated the same way as any
@@ -169,11 +306,11 @@ locales: {
169
306
  readingTime: '{0} min de lecture',
170
307
  lastUpdated: 'Mis à jour {0}',
171
308
  heroInstall: 'Installation',
172
- heroCopy: 'Copier',
173
309
  heroCopied: 'Copié',
174
310
  heroCopyLabel: 'Copier {0}',
175
311
  backToTop: 'Haut',
176
- footerSocial: 'Nous suivre'
312
+ footerSocial: 'Nous suivre',
313
+ newTab: 's\u2019ouvre dans un nouvel onglet'
177
314
  }
178
315
  }
179
316
  }
@@ -187,11 +324,21 @@ locales: {
187
324
  | `readingTime` | `{0} min read` |
188
325
  | `lastUpdated` | `Updated {0}` |
189
326
  | `heroInstall` | `Install` |
190
- | `heroCopy` | `Copy` |
191
327
  | `heroCopied` | `Copied` |
192
328
  | `heroCopyLabel` | `Copy {0}` |
193
329
  | `backToTop` | `Top` |
194
330
  | `footerSocial` | `Follow` |
331
+ | `newTab` | `opens in a new tab` |
332
+ | `sponsors` | `Sponsors` |
333
+ | `sponsorsAction` | `Become a sponsor` |
334
+ | `feedbackQuestion`| `Was this page helpful?`|
335
+ | `feedbackYes` | `Yes` |
336
+ | `feedbackNo` | `No` |
337
+ | `feedbackThanks` | `Thanks for your feedback` |
338
+ | `copyMarkdown` | `Copy as Markdown` |
339
+ | `versionSwitcher` | `Version` |
340
+ | `blogBy` | `By {0}` |
341
+ | `blogEmpty` | `No posts yet` |
195
342
 
196
343
  The banner's own `text` and `linkText` are content, not labels, so they stay under `ff.banner`. The
197
344
  back-to-top tooltip reuses the default theme's `returnToTopLabel`, and the last-updated stamp is
@@ -275,8 +422,13 @@ Registered globally, no import needed.
275
422
  | Component | Use |
276
423
  |--------------------------------------------------|---------------------------------------------------|
277
424
  | `<Api name kind signature since deprecated>` | An API entry: ruled heading, monospaced signature |
425
+ | `<Callout type title>` | A `::: tip`-style note usable inside components |
278
426
  | `<CardGrid :columns>` / `<Card title icon link>` | Card grids |
279
427
  | `<Steps>` | Wraps an ordered list into a numbered rail |
428
+ | `<Tabs syncKey>` / `<Tab label>` | Tab groups; a shared `syncKey` links them |
429
+ | `<Badge text type>` | `new`, `beta`, `deprecated`, `since` variants |
430
+ | `<FileTree>` | A Markdown list drawn as a file tree |
431
+ | `<Timeline>` / `<TimelineItem date title>` | A vertical rail of dated entries |
280
432
  | `<Kbd>` | A key |
281
433
 
282
434
  ## Version
package/config.d.ts CHANGED
@@ -1,6 +1,31 @@
1
- import type { UserConfig } from 'vitepress';
1
+ import type {
2
+ HeadConfig, PageData, SiteConfig, TransformContext, TransformPageContext, UserConfig
3
+ } from 'vitepress';
2
4
  import type { ThemeConfig } from './src/types';
3
5
 
4
6
  declare const config: UserConfig<ThemeConfig>;
5
7
 
8
+ /**
9
+ * Stores the page's Markdown source on `pageData.ffMarkdown` when `themeConfig.ff.copyMarkdown` is on.
10
+ * Call it from your own `transformPageData` and return the result: a hook declared by the host
11
+ * replaces the one in this config.
12
+ */
13
+ export declare function ffTransformPageData(
14
+ pageData: PageData,
15
+ ctx: TransformPageContext<ThemeConfig>
16
+ ): Promise<{ ffMarkdown: string } | undefined>;
17
+
18
+ /**
19
+ * Writes the files generated at the end of the build (`llms.txt`, and the blog feed and Open Graph
20
+ * images once enabled). Call it from your own `buildEnd`: a hook declared by the host replaces the
21
+ * one in this config.
22
+ */
23
+ export declare function ffBuildEnd(siteConfig: SiteConfig<ThemeConfig>): Promise<void>;
24
+
25
+ /**
26
+ * Head entries added by the theme (accent preset, banner script). Call it from your own
27
+ * `transformHead` and merge the result with your entries.
28
+ */
29
+ export declare function ffTransformHead(ctx: TransformContext): HeadConfig[];
30
+
6
31
  export default config;