Docsify: sidebar stops working when we call window.DocsifyCopyCodePlugin.init(),

Created on 17 Apr 2018  路  4Comments  路  Source: docsifyjs/docsify

Hello.
According to #459 and #461 sidebar stops working when we call window.DocsifyCopyCodePlugin.init(), in code.
take a look at this repository and place this code(as it was before). It stops sidebar.

Most helpful comment

This is an issue with docsify-copy-code because we've updated the plugin to a new major version, meaning it has breaking changes.

You no longer need to manually add the stylesheet or call window.DocsifyCopyCodePlugin.init() to initialize the plugin, it will initialize automatically. These changes were made in preparation for better theming support going forward. The changes also include better support for older browsers.

Apologies for the inconvenience.

In short, for others experiencing the same, you can remove all previous code needed to add the plugin and replace it with the following script tag below the docsify script tag:

<script src="https://unpkg.com/docsify-copy-code"></script>

All 4 comments

Just wanted to say that I can confirm this and to mention that it also breaks the coverpage. As far as I know, everything was working a day or two ago.

You can see the effects on this site also: https://adrianbj.github.io/TracyDebugger/

Instructions on how to fix here: https://github.com/jperasmus/docsify-copy-code/issues/7

Making these changes has everything working again for me.

So the bug is from docsify-copy-code?
Even if this solution work (it does) this issue should be open till docsify-copy-code is fixed.

Update: It's not working

This is an issue with docsify-copy-code because we've updated the plugin to a new major version, meaning it has breaking changes.

You no longer need to manually add the stylesheet or call window.DocsifyCopyCodePlugin.init() to initialize the plugin, it will initialize automatically. These changes were made in preparation for better theming support going forward. The changes also include better support for older browsers.

Apologies for the inconvenience.

In short, for others experiencing the same, you can remove all previous code needed to add the plugin and replace it with the following script tag below the docsify script tag:

<script src="https://unpkg.com/docsify-copy-code"></script>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

soulfly picture soulfly  路  4Comments

dooart picture dooart  路  5Comments

timrossback picture timrossback  路  3Comments

nothingrandom picture nothingrandom  路  5Comments

Jadyli picture Jadyli  路  3Comments