website
website copied to clipboard
Handle when documents are deleted
Currently we are not taking into consideration when a document is deleted as it is still part of the sidebars and the build fails.
can i get assigned to this task?
Sorry for the delay, yes you can work on this @paul-111 !
Hi. I think we can fix this by making changes in the sidebar.js file. Currently the file is statically taking references for the pages, I think I can write some javascript function that will dynamically generate sidebar items. Am I thinking in the right direction?
@DevanceJ the sidebar.js
file is created by the create-sidebar.ts
file. What needs to change seems to be that function.
but a question to maintainers is, why not generate on each pre-build, and choose instead to refer to the existing sidebars.js
file? It technically is only 390 lines so not much time optimisation by writing it this way?
Hey, I'll take a look into this. Thank you
@erickzhao could you help advise whether generating sidebar.js from scratch might be good? Building from scratch without an existing sidebar.js
returns a very different page menu tree as compared to with existing sidebar.js
. Though, the latter is the one consistent with the live electronjs website. Thanks in advance!