webdoc-labs / webdoc

Documentation generator for the web
https://www.webdoclabs.com
Other
79 stars 9 forks source link

Templates: Consider package.json dependent data in separate .js file. #19

Closed Zekfad closed 2 years ago

Zekfad commented 4 years ago

For example, when you change package version, doc rebuild cause additional git diffs, which are actually makes no sense for documentation. It would be great to make for example metadata.js which will contain such data (e.g. version, module description, last git commint, etc.) and load it on-demand within webpage. Drawback is that no-js browsers wont be able to see that data. Here's example of changes in docs, which are makes no sense in terms of documentation: https://github.com/Zekfad/ueue/commit/f10682f94ef6de56c873992d9d35940ffaf2ff2d

Zekfad commented 4 years ago

I see there's already exist some sort of .json generation: https://github.com/webdoc-js/example-documentation/blob/master/explorer/reference.json But, i'd like to make and .js file, in order to make stand-alone .html files accessible without need of web server. We can set order of .js imports, so .js files which provide state will be loaded, and then we can use any framework to bring page a live.

ShukantPal commented 2 years ago

We actually don't load stuff from the package.json - apart from package names at the moment.