Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle when documents are deleted #139

Open
molant opened this issue Nov 4, 2021 · 6 comments
Open

Handle when documents are deleted #139

molant opened this issue Nov 4, 2021 · 6 comments
Labels
🪲 bug Something isn't working

Comments

@molant
Copy link
Contributor

molant commented Nov 4, 2021

Currently we are not taking into consideration when a document is deleted as it is still part of the sidebars and the build fails.

@molant molant added the 🪲 bug Something isn't working label Nov 4, 2021
@paul-111
Copy link

can i get assigned to this task?

@molant
Copy link
Contributor Author

molant commented Mar 22, 2022

Sorry for the delay, yes you can work on this @paul-111 !

@DevanceJ
Copy link
Contributor

DevanceJ commented Mar 10, 2024

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?

@c6z3h
Copy link

c6z3h commented Apr 14, 2024

@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?

@DevanceJ
Copy link
Contributor

Hey,
I'll take a look into this. Thank you

@c6z3h
Copy link

c6z3h commented Apr 17, 2024

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants