-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
Repro
Using the current v5 pre-release (docsify@5.0.0-rc.4), configure Docsify with:
<script>
window.$docsify = {
routerMode: 'history',
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify@5.0.0-rc.4/dist/docsify.min.js"></script>Then load the page.
Actual result
Docsify crashes during startup with:
Uncaught Error: Subclass should implement
In the distributed bundle this comes from the abstract History.normalize() implementation being called during Router.updateRender().
Expected result
routerMode: 'history' should initialize and render normally.
Why this happens
The router code currently assumes every router implements normalize():
src/core/router/index.jscallsthis.router?.normalize()insideupdateRender().src/core/router/history/hash.jsimplementsnormalize().src/core/router/history/html5.jsdoes not implementnormalize().src/core/router/history/base.jsdefinesnormalize()as an abstract method that throwsError('Subclass should implement').
I also checked the current develop branch sources on March 25, 2026, and the same mismatch is still present there.
Notes
I hit this while migrating a Docsify site from v4 to v5. A local workaround was to patch updateRender() / router.normalize to a no-op for history mode, after which history routing worked as expected, including direct deep links.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels