docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.43k stars 5.67k forks source link

Custom sidebar repeat rendering #1693

Open buuing opened 2 years ago

buuing commented 2 years ago

Bug Report

When I use file embedding, I find that the sidebar on the left is rendered repeatedly

The first time I enter the first page, there is no problem, but when I press F5 to refresh the page at first, I will see the following sidebar

image

Steps to reproduce

When using file embedding, you can see the problem

What is current behaviour

The sidebar is rendered repeatedly

What is the expected behaviour

I want the sidebar to render correctly

Other relevant information

Please create a reproducible sandbox

It seems that file embedding cannot be used on codesandbox To this end, I specially prepared a small demo to run and see the problem

docsify-test.zip

Mention the docsify version in which this bug was not present (if any)

docsify@4.10.x

buuing commented 2 years ago

Is this project still under maintenance? If this problem is caused by my configuration error, please also prompt me

trusktr commented 2 years ago

I've seen some funkiness like this before. This could be a bug.

buuing commented 2 years ago

I just found that writing like this can suppress this error

[test](../test.html ':include :type=code :fragment=demo js')

[test](../test.html ':include')


But if so, the error will recur as usual

[test](../test.html ':include')

[test](../test.html ':include :type=code :fragment=demo js')
buuing commented 2 years ago

At present, my solution is to add an [test](../test.html ':include :type=code :fragment=demo js') at the beginning of each .md document

trusktr commented 2 years ago

That's peculiar. Thanks for pointing that out!

mljuliang commented 2 years ago

I am still having this issue. any updates?