steveush / foodoc

A Bootstrap and Handlebars based JSDoc3 template.
GNU General Public License v3.0
23 stars 14 forks source link

Set a theme? #19

Closed dmurdoch closed 3 years ago

dmurdoch commented 3 years ago

The docs say that foodoc is derived from docStrap, and the config files look quite similar. docStrap supports bootswatch themes using a theme entry. foodoc has the stylesheets and scripts entries. Are they sufficient to change themes? Is there any guidance on how to do it?

steveush commented 3 years ago

Hey @dmurdoch,

Been a while since I've looked at this project, unfortunately there is no support for bootswatch themes. At the top of the README it says:

This project began as a simple modification of DocStrap. Removing the Bootswatch support in favor of my own CSS customizations but it ended up with me re-writing pretty much the entire template, even switching out the template engine to Handlebars.

There is simple theming support using the systemColor and systemLogo options but other than that anything else will need to be done as a custom stylesheet and then included with the stylesheets option.

The stylesheets option doesn't do anything other than loop through the string array and dump the provided strings into the <head/> as stylesheets. You can see how it does it looking at the _layout.hbs file in the repo. So if you want to provide custom CSS you can write your stylesheet and call it say custom.css. Then when you generate the template set the stylesheets option to be stylesheets: ["css/custom.css"]. Once the template is generated you can then copy your custom.css file into the css folder along with the other CSS files and it should be good to go.

Thanks

dmurdoch commented 3 years ago

Thanks for the detailed response!