esbonio icon indicating copy to clipboard operation
esbonio copied to clipboard

Add "build all" command to VSCode extension

Open ghost opened this issue 2 years ago • 6 comments

A would like to see a "build all" command in the VSCode extension.

This is really helpfull when editing a toctree directive. The toctree isn't automatically updated on other pages, only when saving them again. So each and every page must be saved to inherit the updated toctree.

ghost avatar Aug 29 '22 08:08 ghost

I don't know if I am missing something, but I have pinned the command to restart the language server, so it is only a click away. I use it often. I have a large website to build, but rebuild all by restarting the language server is really fast and waiting is zero issue for me.

davbeek avatar Aug 29 '22 08:08 davbeek

Maybe I'm missing something too, but in my case, the table of contents in the sidebar isn't updated, even when I restart the language server. I'm using the sphinx-book-theme.

ghost avatar Aug 29 '22 11:08 ghost

the table of contents in the sidebar isn't updated, even when I restart the language server

Sounds like Sphinx's caching is getting in the way.

Currently there is an esbonio.sphinx.forceFullBuild option you can try that should force Sphinx to build everything when the server restarts.

But a command that only triggers a full build sounds like a good idea :)

alcarney avatar Aug 29 '22 16:08 alcarney

Currently there is an esbonio.sphinx.forceFullBuild option you can try that should force Sphinx to build everything when the server restarts.

Thanks for pointing out the option, I must have overlooked it. Restarting the language server now updates the sidebar TOC as it should.

But a command that only triggers a full build sounds like a good idea :)

I'm glad to hear that!

ghost avatar Aug 30 '22 09:08 ghost

in my case, the table of contents in the sidebar isn't updated, even when I restart the language server.

When you delete the Sphinx/Esbonio build folder before restarting the language server, the complete website is rebuilt, but you will need to close and reopen the Esbonio previewer when the language server is finished rebuilding.

I use the Esbonio setting "esbonio.sphinx.buildDir": "${workspaceFolder}/_build/html" to have the build dir (_build/html) at the top level of my VSCode workspace, for easy access.

davbeek avatar Aug 30 '22 11:08 davbeek

As well as a "build all" command, there should be the option to clear the build folder and start from scratch

See: https://github.com/swyddfa/esbonio/issues/609#issuecomment-1722913901

alcarney avatar Apr 23 '24 21:04 alcarney