Open LazyScholar opened 3 years ago
If dropping in another CSS file would be sufficient, we could add some API where each plugin provides extra HTML assets.
Currently we loop over the .assets
field of the HTML
object to add user-defined assets: https://github.com/JuliaDocs/Documenter.jl/blob/dd7eebed2c0633b99954447e796194bd46cd1acb/src/Writers/HTMLWriter.jl#L886
In the same place we could loop over each plugin in ctx.documenter.plugins
and ask if it also wants to add some extra assets.
It would be nice to allow plugins like
DocumenterCitations.jl
to pass css-style additions to theDocumenter.jl
html-writer assets.This would allow to add own plugin specific css styles to enhance readability of elements which are added to the HTML documentation by a plugin (without starting to clutter the
Documenter.jl
default style).This might also allow the creation of plugins with advanced
.js
capabilities (a option to limit additions of assets like.css
or.js
to the scope of the plugin (instead of each page) might be needed here).Currently this could only be done by raw html insertion into the markdown (by the user or the plugin), by element wise css modification by the plugin or by manually adding a css asset .
Probably related/conflicting: #615 #982 #1433
Examples which could be improved by small plugin css additions:
DocumenterCitations.jl