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
docs: add markdown renderer migration guide for v4 to v5
Adds documentation for migrating custom markdown renderer overrides
from v4 to v5. The window..markdown option is deprecated
in v5, so this guide provides alternative approaches using:
1. marked extensions (recommended)
2. Docsify plugins with custom renderers
Closes#2680
Copy file name to clipboardExpand all lines: docs/v5-upgrade.md
+101Lines changed: 101 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,107 @@ View [Theme Classes](themes.md?id=classes) for more details.
117
117
-**Themes**: v5 uses a core theme (with optional add-ons available)
118
118
-**Plugin Names**: `zoom-image` → `zoom`
119
119
120
+
## Migrating Custom Markdown Renderer Overrides
121
+
122
+
If you were customizing the Markdown renderer in v4 using the `window.$docsify.markdown` configuration option, you'll need to update your approach for v5.
123
+
124
+
### v4 Approach (Deprecated)
125
+
126
+
In v4, you could customize the marked renderer like this:
In v5, Docsify uses **marked v13+**, which has a different architecture. The `window.$docsify.markdown` option is no longer supported. Instead, use one of these approaches:
152
+
153
+
#### Option 1: Using marked Extensions (Recommended)
154
+
155
+
Load your marked extension before Docsify and register it in the configuration:
0 commit comments