Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6dcef69
chore: Update CodeSandbox link in README (#2769)
paulhibbitts Jul 27, 2026
bd71ebf
docs: update Showcase link in README to use internal anchor (#2771)
sy-records Jul 30, 2026
e446bf9
fix(docs): script source for zoom-image plugin (#2776)
paulhibbitts Aug 3, 2026
d882e75
chore: bump postcss from 8.5.15 to 8.5.23 (#2770)
dependabot[bot] Aug 3, 2026
24a16c6
feat(search): resultSource option shows where results come from (#2767)
piecioshka Aug 4, 2026
ee7063c
feat: add configurable right sidebar (#2772)
shivanshgupta365 Aug 4, 2026
030652c
fix: update sidebar anchor activation logic (#2779)
sy-records Aug 9, 2026
a8f151e
fix: avoid quadratic slugify cache lookup (#2783)
sy-records Aug 11, 2026
5c50b9b
fix: prevent long links from causing horizontal overflow (#2786)
sy-records Aug 13, 2026
92cdd13
fix: preserve loose-list sidebar links when collapsed (#2787)
sy-records Aug 15, 2026
bd8f2ea
docs: Adds instructions to upgrade custom plugins to v5 (#2788)
julienbusset Aug 19, 2026
5099294
feat(sidebar): add collapsible root sidebar groups (#2784)
sy-records Aug 20, 2026
e5ccdfb
chore: update postinstall script (#2791)
sy-records Aug 26, 2026
84c2d67
feat(sidebar): normalize page links and control root chevrons (#2790)
sy-records Sep 4, 2026
879f02e
feat(navbar): add navbarPreservePath option (#2780)
sy-records Sep 5, 2026
72fd7f9
feat: add ESM configuration for Docsify (#2751)
sy-records Sep 9, 2026
a408e76
fix(a11y): preserve sidebar focus after navigation (#2740)
puneetdixit200 Sep 19, 2026
f34374b
fix(sidebar): complete loading when nested sidebar is missing (#2801)
sy-records Sep 20, 2026
ffbc2f1
fix(search): parse inline formatting inside bold text (#2815)
xu91102 Sep 27, 2026
d823dbe
fix(a11y): set aria-expanded on sidebar links that toggle a sub-sideb…
gagan-baghel Sep 28, 2026
d89c5a1
chore: bump crowdin/github-action from 2 to 3 (#2824)
dependabot[bot] Oct 2, 2026
a3ce91e
docs: remove BootCDN link from CDN documentation (#2831)
sy-records Oct 9, 2026
509cd03
chore: bump axios from 1.18.0 to 1.20.0 (#2830)
dependabot[bot] Oct 12, 2026
a5519a0
chore: bump immutable from 3.8.3 to 3.8.4 (#2806)
dependabot[bot] Oct 13, 2026
7272bfa
fix(search): preserve literal code block content in index (#2816)
xu91102 Oct 14, 2026
2d8cb5a
fix(search): replace stale records when saving an index (#2817)
xu91102 Oct 16, 2026
25b08a5
chore: bump postcss-cli from 11.0.0 to 12.0.0 (#2825)
dependabot[bot] Oct 17, 2026
bd65c2e
chore: bump source-map-js from 1.2.1 to 1.2.2 (#2834)
dependabot[bot] Oct 19, 2026
b6ba9b6
chore: bump follow-redirects from 1.16.0 to 1.16.1 (#2840)
dependabot[bot] Oct 21, 2026
3d82b26
fix(external-script): preserve HTML attributes (#2819)
xu91102 Oct 21, 2026
d6c70e5
chore: bump shell-quote from 1.10.0 to 1.12.0 (#2836)
dependabot[bot] Oct 22, 2026
2ad7736
docs: add deed.page to deploy guide (#2842)
f-o-x11 Oct 27, 2026
b471072
chore: bump postcss-selector-parser from 7.1.4 to 7.1.7 (#2832)
dependabot[bot] Oct 27, 2026
7a7386b
chore: bump brace-expansion from 1.1.16 to 1.1.21 (#2838)
dependabot[bot] Oct 27, 2026
220ee76
chore: bump handlebars from 4.7.9 to 4.7.10 (#2835)
dependabot[bot] Oct 27, 2026
91c923a
fix(ajax): retain response status in cached results (#2813)
xu91102 Oct 27, 2026
6a97b21
chore: bump @vue/server-renderer and vue (#2837)
dependabot[bot] Oct 27, 2026
50c5cac
chore: bump serialize-javascript from 7.0.5 to 7.1.4 (#2844)
dependabot[bot] Oct 27, 2026
f991523
fix(link): isolate per-link target overrides (#2818)
xu91102 Oct 28, 2026
ca8d256
chore: bump browserslist from 4.28.4 to 4.28.9 (#2798)
dependabot[bot] Oct 28, 2026
3a0a4d4
chore: bump qs from 6.15.2 to 6.17.0 (#2847)
dependabot[bot] Oct 28, 2026
eef0e53
chore: bump cssnano from 8.0.2 to 9.9.0 (#2829)
dependabot[bot] Oct 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body:
label: Steps to reproduce
description: |
A description with steps to reproduce the issue.
Provide a link to a public repository or create a reproducible [sandbox](https://codesandbox.io/s/307qqv236):
Provide a link to a public repository or create a reproducible [sandbox](https://sandbox.docsifyjs.org/):
placeholder: |
1. Step 1
2. Step 2
Expand Down
4 changes: 0 additions & 4 deletions .github/semantic.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v7

- name: Crowdin push
uses: crowdin/github-action@v2
uses: crowdin/github-action@v3
with:
upload_sources: true
upload_translations: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
uses: actions/upload-artifact@v7
if: failure()
with:
name: ${{ matrix.os }}-${{ matrix.node-version }}-artifacts
name: test-artifacts-${{ github.run_id }}-${{ github.run_attempt }}
path: |
_playwright-results/
_playwright-report/
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
console.log(husky());
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Docsify turns one or more Markdown files into a Website, with no build process r

Get going fast by using a static web server or GitHub Pages with this ready-to-use [Docsify Template](https://github.com/docsifyjs/docsify-template), review the [quick start tutorial](https://docsify.js.org/#/quickstart) or jump right into a CodeSandbox example site with the button below.

[![Edit 307qqv236](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/307qqv236)
[![Edit in CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://sandbox.docsifyjs.org/)

## Showcase

Expand Down
23 changes: 0 additions & 23 deletions SECURITY.md

This file was deleted.

18 changes: 18 additions & 0 deletions build/types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import fs from 'node:fs/promises';
import path from 'node:path';

const projectDir = path.join(import.meta.dirname, '..');
const sourcePath = path.join(projectDir, 'src/core/module.d.ts');
const outputDir = path.join(projectDir, 'dist');
const outputNames = ['docsify.module.d.ts', 'docsify.module.min.d.ts'];

const declaration = (await fs.readFile(sourcePath, 'utf8'))
.replaceAll('"./', '"../src/core/')
.replace(/\/\/# sourceMappingURL=.*\n?$/, '');

await fs.mkdir(outputDir, { recursive: true });
await Promise.all(
outputNames.map(outputName =>
fs.writeFile(path.join(outputDir, outputName), declaration),
),
);
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Docsify turns your Markdown files into a documentation website instantly. Unlike

## Examples

Check out the [Showcase](https://github.com/docsifyjs/awesome-docsify#showcase) to see docsify in use.
Check out the [Showcase](awesome?id=showcase) to see docsify in use.

## Donate

Expand Down
1 change: 0 additions & 1 deletion docs/cdn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Other CDNs are available and may be required in locations where jsDelivr is not

- https://cdnjs.com/libraries/docsify
- https://unpkg.com/browse/docsify/
- https://www.bootcdn.cn/docsify/

## Specifying versions

Expand Down
75 changes: 75 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ You can configure Docsify by defining `window.$docsify` as an object:
</script>
```

Docsify is also available as an ES module. Import `Docsify` from a CDN and pass
the configuration object to a new `Docsify` instance:

```html
<script type="module">
import { Docsify } from '//cdn.jsdelivr.net/npm/docsify@5/dist/docsify.module.min.js';

new Docsify({
repo: 'docsifyjs/docsify',
maxLevel: 3,
coverpage: true,
});
</script>
```

The config can also be defined as a function, in which case the first argument is the Docsify `vm` instance. The function should return a config object. This can be useful for referencing `vm` in places like the markdown configuration:

```html
Expand Down Expand Up @@ -109,6 +124,37 @@ window.$docsify = {

Determines if Docsify should handle uncaught _synchronous_ plugin errors automatically. This can prevent plugin errors from affecting docsify's ability to properly render live site content.

## collapseSidebarGroups

- Type: `Boolean`
- Default: `false`

Initially collapses all root sidebar groups when `collapsibleSidebarGroups` is
enabled. Visitors can still expand and collapse each group by selecting its
title. Their choices are preserved while navigating between pages.

```js
window.$docsify = {
collapseSidebarGroups: true,
collapsibleSidebarGroups: true,
};
```

## collapsibleSidebarGroups

- Type: `Boolean`
- Default: `false`

Enables visitors to expand and collapse root sidebar groups by selecting their
titles or using the <kbd>Enter</kbd> and <kbd>Space</kbd> keys. Enabling a
sidebar chevron theme class also displays chevrons on these group titles.

```js
window.$docsify = {
collapsibleSidebarGroups: true,
};
```

## cornerExternalLinkTarget

- Type: `String`
Expand Down Expand Up @@ -306,6 +352,20 @@ window.$docsify = {
};
```

## sidebarPosition

- Type: `String`
- Default: `'left'`

Controls which side of the page displays the sidebar. Set this to `'right'` to
place the sidebar and its toggle on the right.

```js
window.$docsify = {
sidebarPosition: 'right',
};
```

## homepage

- Type: `String`
Expand Down Expand Up @@ -472,6 +532,21 @@ window.$docsify = {
};
```

## navbarPreservePath

- Type: `Boolean`
- Default: `false`

If **true**, appends the current document path to navbar links that point to a language root. This makes it possible to switch languages while staying on the corresponding document.

For example, when the current path is `/quickstart`, a navbar link to `/zh-cn/` becomes `/zh-cn/quickstart`.

```js
window.$docsify = {
navbarPreservePath: true,
};
```

## name

- Type: `Boolean|String`
Expand Down
11 changes: 11 additions & 0 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,14 @@ To deploy your Docsify site using DeployHQ:
Your Docsify site will be deployed to your server. You can enable automatic deployments to deploy on every Git push, or schedule deployments for specific times.

For more information on advanced deployment features, see [DeployHQ's documentation](https://www.deployhq.com/support).

## deed.page

[deed.page](https://deed.page) hosts static sites published with one HTTP `PUT`. No account or build step is needed, so you can upload the `docs` folder as it is:

```bash
tar -C docs -czf site.tar.gz .
curl -T site.tar.gz "https://deed.page/v1/sites?slug=my-docs"
```

The response includes the live `https://my-docs.deed.page/` URL and a token. To publish an update to the same slug, run the same command with `-H "Authorization: Bearer <token>"`. A single upload is capped at 4 MB; see the [deed.page docs](https://deed.page/docs) for larger sites.
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
'https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@main/$1',
},
auto2top: true,
collapsibleSidebarGroups: true,
coverpage: true,
executeScript: true,
// hideSidebar: true,
Expand Down
5 changes: 5 additions & 0 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ By default, the hyperlink on the current page is recognized and the content is s
// You can provide a regexp to match prefixes. In this case,
// the matching substring will be used to identify the index
pathNamespaces: /^(\/(zh-cn|ru-ru))?(\/(v1|v2))?/,

// Show where each result comes from (default: 'none')
// 'page': the page title, e.g. "Guide"
// 'breadcrumb': the sidebar path, e.g. "Basics › Guide"
resultSource: 'none',
},
};
</script>
Expand Down
16 changes: 16 additions & 0 deletions docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,21 @@ Display a loading animation while waiting for Docsify to initialize.

Display expand/collapse icons on page links in the sidebar.

Root group titles display chevrons only when
[`collapsibleSidebarGroups`](configuration.md?id=collapsiblesidebargroups) is
enabled.

<label>
<input class="toggle" type="checkbox" value="sidebar-chevron-right" data-class data-group="sidebar-chevron"> Preview <code>sidebar-chevron-right</code>
</label>
<br>
<label>
<input class="toggle" type="checkbox" value="sidebar-chevron-left" data-class data-group="sidebar-chevron"> Preview <code>sidebar-chevron-left</code>
</label>
<br>
<label>
<input class="toggle" type="checkbox" value="sidebar-chevron-root-hidden" data-class> Hide root-level chevrons with <code>sidebar-chevron-root-hidden</code>
</label>

<!-- prettier-ignore -->
```html
Expand All @@ -128,6 +136,14 @@ Display expand/collapse icons on page links in the sidebar.
<body class="sidebar-chevron-left">
```

To hide chevrons on all root-level page links and group titles while retaining
chevrons on nested page links, add the `sidebar-chevron-root-hidden` class:

<!-- prettier-ignore -->
```html
<body class="sidebar-chevron-right sidebar-chevron-root-hidden">
```

To prevent chevrons from displaying for specific page links, add a `no-chevron` class as follows:

```md
Expand Down
33 changes: 31 additions & 2 deletions docs/v5-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ View [Theme Classes](themes.md?id=classes) for more details.
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>

<!-- v5 -->
<script src="//cdn.jsdelivr.net/npm/docsify@5/dist/plugins/zoom.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify@5/dist/plugins/zoom-image.min.js"></script>
```

**Note:** If you're using additional Docsify plugins (such as emoji, external-script, front-matter, etc.), you'll need to update those URLs as well following the same pattern:
Expand All @@ -110,12 +110,41 @@ View [Theme Classes](themes.md?id=classes) for more details.
- Update version from `@4` (or non-versioned) to `@5`
- Example: `//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js` becomes `//cdn.jsdelivr.net/npm/docsify@5/dist/plugins/emoji.min.js`

#### Plugin Authors

If you've written a custom plugin that uses `window.Docsify.dom.toggleClass`, this helper has been removed in v5. Replace it with the native `Element.classList` API.

Examples:

```js
// v4
window.Docsify.dom.toggleClass(element, 'className');

// v5
element.classList.toggle('className');
```

```js
// v4
window.Docsify.dom.toggleClass(element, 'action', 'className');

// v5
element.classList.action('className');
```

```js
// v4
window.Docsify.dom.toggleClass(element, isDark ? 'add' : 'remove', 'dark');

// v5
element.classList[isDark ? 'add' : 'remove']('dark');
```

## Key Differences Summary

- **CDN Path**: Changed from `/lib/` to `/dist/`
- **Version**: Updated from `@4` to `@5`
- **Themes**: v5 uses a core theme (with optional add-ons available)
- **Plugin Names**: `zoom-image` → `zoom`

## Additional Notes

Expand Down
Loading
Loading