You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Style updates:
- New "core" theme serves as base for all other themes (official and third-party)
- New CSS custom properties for simplified customization of "core" theme
**Note:** List of available properties will be made available in documentation by embedding soruce CSS in docs after merge. Merge is required because embedded CSS needs to be in `main` branch. For now, see `_vars.css` and `_vars-advanced.css` for details.
- New theme "add-ons" modify core theme properties and/or add custom declarations as needed.
- New Prism.js theme support
- New configurable sidebar toggle design
- New typography defaults to system sans-serif and monospace fonts instead of relying on external web font.
- New "Core Dark" theme addon provide dark theme styles. Can optionally be applied based on operating system's light/dark setting using `@media` attribute on `<link>` element.
- New "Vue" theme addon. Closely replicated popular v4 theme while allowing for v5 enhancements.
- New CSS class names available for adding loading indicators, adding sidebar expand/collapse icons, adding sidebar group styles, clamping sidebar links to a single line with ellipses, and changing the sidebar toggle icon.
- New auto-generated gradient background for cover page (ensure gradient hue is > 50 degree apart, use OKLCH color if supported, randomize grandient angle, reduce brightness in dark mode)
- New button styles (basic, primary, secondary)
- New form element styles (text input, radio, checkbox, )
- New "callouts" (previously "important" and "tip" helpers)
- New default syntax highlighting theme (from [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/))
- New auto-generated theme color shade and tint colors
- New auto-generated monochromatic color palette
- New form element styles (fields, legend, text input, text area, checkbox, radio, toggles, and select)
- New "headerless" tables
- New `kbd` styles
- New task list style
- New merged navbar styles (consistent with sidebar nav styles)
- New search plugin styles and keyboard shortcut indicators
- Add ability restore previously focused content element after hiding sidebar
- Add "focus trap" when sidebar is visible on mobile (accessibility)
- Add ability for sidebar links to wrap by default (previous single-line w/ ellipsis display available as CSS class on `<body>` option)
- Add sidebar `page-link`, `group`, and `group-title` CSS classes to sidebar markup.
- Add reduced motion media query to set all animation/transition timings to zero
- Update Google Font imports (use new variable vs older fixed width fonts)
- Update primary/secondary button order on coverpage (primary should be first)
- Fix missing merged navbar when loading at desktop resolution then resizing to mobile
- Fix inverted open/close sidebar visibility state at desktop/mobile resolutions
- Fix overflow setting to prevent clipping of element focus ring
- Fix safe area inset margins on mobile in landscape orientation
- Fix inverted "tip" and "warn" class names
- Fix scroll padding to prevent headers from touching top edge of viewport when scrolled to
- Remove Stylus dependency (now using only PostCSS)
- Remove legacy themes "Buble", "Dark", "Dolphin", and "Pure".
Documentation updates:
- New "UI Kit" page showcasing all elements styled by Docsify
- Update "Quick Start" page template
- Update "Adding pages" page with information on how to properly create sidebar group titles and navbar drop-down menus
- Update "Themes" page with theme and class toggles
- Update "Configuration" page with deprecation warnings for `themeColor` and `topMargin`
- Move "Edit Page" link to footer
- Remove [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/) endorsement (currently not compatible with v5 and future is unknown)
Miscellaneous updates:
- New search plugin options: `insertBefore` and `insertAfter`
- Add PostCSS config file
- Update BrowserSync config (disable "ghost" mode)
- Update tests
- Fix Jest + Prettier 3 conflict
- Fix `getAndRemoveDocisfyIgnoreConfig` name type (now `Docisfy` => `Docsify`)
- Fix execution of sidebar-generating code when `hiddenSidebar` is `true`
- Remove `inBrowser` constant (SSR deprecated, so no longer needed)
Copy file name to clipboardExpand all lines: docs/adding-pages.md
+18-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# More pages
1
+
# Adding pages
2
2
3
3
If you need more pages, you can simply create more markdown files in your docsify directory. If you create a file named `guide.md`, then it is accessible via `/#/guide`.
4
4
@@ -46,7 +46,23 @@ Create the `_sidebar.md`:
46
46
<!-- docs/_sidebar.md -->
47
47
48
48
- [Home](/)
49
-
- [Guide](guide.md)
49
+
- [Page 1](page-1.md)
50
+
```
51
+
52
+
To create section headers:
53
+
54
+
```markdown
55
+
<!-- docs/_sidebar.md -->
56
+
57
+
- Section Header 1
58
+
59
+
- [Home](/)
60
+
- [Page 1](page-1.md)
61
+
62
+
- Section Header 2
63
+
64
+
- [Page 2](page-2.md)
65
+
- [Page 3](page-3.md)
50
66
```
51
67
52
68
You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
Copy file name to clipboardExpand all lines: docs/configuration.md
+9-15
Original file line number
Diff line number
Diff line change
@@ -376,7 +376,7 @@ window.$docsify = {
376
376
377
377
Website logo as it appears in the sidebar. You can resize it using CSS.
378
378
379
-
!> Logo will only bee visible if `name` prop is also set. See [name](#name) configuration.
379
+
!> Logo will only be visible if `name` prop is also set. See [name](#name) configuration.
380
380
381
381
```js
382
382
window.$docsify= {
@@ -917,17 +917,9 @@ If you have a link to the homepage in the sidebar and want it to be shown as act
917
917
918
918
For more details, see [#1131](https://github.com/docsifyjs/docsify/issues/1131).
919
919
920
-
## themeColor (_deprecated_)
920
+
## themeColor ⚠️
921
921
922
-
> **Warning** Deprecated. Use the CSS var `--theme-color` in your `<style>` sheet. Example:
923
-
>
924
-
> ```html
925
-
> <style>
926
-
>:root {
927
-
> --theme-color: deeppink;
928
-
> }
929
-
></style>
930
-
> ```
922
+
!> Deprecated as of v5. Use the `--theme-color`[theme property](themes#theme-properties) to [customize](themes#customization) your theme color.
931
923
932
924
- Type: `String`
933
925
@@ -939,16 +931,18 @@ window.$docsify = {
939
931
};
940
932
```
941
933
942
-
## topMargin
934
+
## topMargin ⚠️
943
935
944
-
- Type: `Number`
936
+
!> Deprecated as of v5. Use the `--scroll-padding-top`[theme property](themes#theme-properties) to specify a scroll margin when using a sticky navbar.
937
+
938
+
- Type: `Number|String`
945
939
- Default: `0`
946
940
947
-
Adds a space on top when scrolling the content page to reach the selected section. This is useful in case you have a _sticky-header_ layout and you want to align anchors to the end of your header.
941
+
Adds scroll padding to the top of the viewport. This is useful when you have added a sticky or "fixed" element and would like auto scrolling to align with the bottom of your element.
Alternatively, a background color or image can be specified in the cover page markdown.
45
48
46
-
[GitHub](https://github.com/docsifyjs/docsify/)
47
-
[Get Started](#quick-start)
49
+
```markdown
50
+
<!-- background color -->
48
51
52
+

53
+
```
54
+
55
+
```markdown
49
56
<!-- background image -->
50
57
51
58

52
-
53
-
<!-- background color -->
54
-
55
-

56
59
```
57
60
58
61
## Coverpage as homepage
59
62
60
-
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](configuration.md#onlycover).
63
+
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [`onlyCover`](configuration.md#onlycover) option.
Copy file name to clipboardExpand all lines: docs/custom-navbar.md
+12
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,17 @@ Alternatively, you can create a custom markdown-based navigation file by setting
40
40
- [chinese](/zh-cn/)
41
41
```
42
42
43
+
To create drop-down menus:
44
+
45
+
```markdown
46
+
<!-- _navbar.md -->
47
+
48
+
- Translations
49
+
50
+
- [En](/)
51
+
- [chinese](/zh-cn/)
52
+
```
53
+
43
54
!> You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
44
55
45
56
`_navbar.md` is loaded from each level directory. If the current directory doesn't have `_navbar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_navbar.md` will be loaded from `/guide/_navbar.md`.
@@ -59,6 +70,7 @@ You can create sub-lists by indenting items that are under a certain parent.
0 commit comments