Hi everyone,
I just released a major update to BonitoBook with a powerful new plugin system and significantly faster loading times.
Plugin System
The biggest feature is a flexible plugin system that lets you completely customize how notebooks are rendered. Create custom book types by defining a module with create_book()
and jsrender()
:
struct MyBook <: BonitoBook.AbstractBook
book::BonitoBook.Book
end
create_book(book::BonitoBook.Book; kwargs...) = MyBook(book)
# Custom rendering logic, which allows easy re-using of existing functionality
Bonito.jsrender(session::Session, my_book::MyBook) = ...
Check out the examples to see the plugins in action:
Slideshow
Create presentations from your notebooks
Draggable layouts
Interactive, repositionable cells
Scientific book format
Build your own notebook styles with table of content and customized table display etc.
Faster Loading
Moved PythonCall and WGLMakie to an extensions, significantly reducing dependencies and load times. Took the chance to make the language support very easy to extend and overload for any other language, check out the new howto section to learn more!
Other Improvements
- Simplified styling with single
generate_style()
function - Inline slider values in
@manipulate
- Better mobile styling and tooltips
- Flat folder structure with lazy file loading (as long as you dont customize styling it will be loaded from BonitoBook templates, making updates much easier)
Migration
For existing users: Delete .name-bbook/
folder and restart (backup custom files first if needed).
Full details in the new blog.
I’m excited to see what plugins the community creates!