clenemt / docdash

:zap: Lodash inspired JSDoc 3 template/theme
http://clenemt.github.io/docdash/
Other
824 stars 201 forks source link

[enhancement wish] common nav for all html pages #75

Closed dcaillibaud closed 3 years ago

dcaillibaud commented 4 years ago

Hi,

On a quite big js project, generated documentation is 1224 files of 2Mo each (2,3Go). It's because the

dcaillibaud commented 4 years ago

With some clues about how to achieve this I can try to make a PR.

ar2rsawseen commented 4 years ago

I guess the way to go about this would be 1) Based on the config option, hide the nav side with search from layout file (https://github.com/clenemt/docdash/blob/master/tmpl/layout.tmpl) and adjust all other needed CSS tweaks if any 2) create a new template with navigation and iframe and based on the same config, export it as main index file: https://github.com/clenemt/docdash/blob/master/publish.js#L706-L710 3) based on the same config modify navigation building to call some js function that will change the source of iframe instead of going to another HTML page (https://github.com/clenemt/docdash/blob/master/publish.js#L428), you will probably have to wrap linkto function for that

I think that is bout it :)

dcaillibaud commented 4 years ago

Thanks for these detailed clues.

I'll try to add a new config option "iframeNav" and handle it in templates. If it works as I want I'll make a PR.

dcaillibaud commented 3 years ago

After a big delay I made it : https://github.com/clenemt/docdash/pull/95

It's not an iframe, really easier fetching html code and add it directly in the page (included html should be in browser cache after the first page display)