Skip to content
Open
Changes from 1 commit
Commits
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
Prev Previous commit
docs: update configuration for ESM
  • Loading branch information
sy-records committed Sep 3, 2026
commit cfe77b25e7208e1d4571d1e33fa7a19bde3d468d
23 changes: 11 additions & 12 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# Configuration

The recommended way to configure and start Docsify is to import the ES module
from a CDN and create a new `Docsify` instance:
You can configure Docsify by defining `window.$docsify` as an object:

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

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

If you load the classic Docsify script instead, you can configure Docsify by
defining `window.$docsify` as an object:
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>
window.$docsify = {
<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>
```

Expand Down