Open crotwell opened 1 year ago
Possibility to use https://pypi.org/project/jsonschema2rst/
For completeness, there another option proposed is to use: https://pypi.org/project/json-schema-for-humans/0.14.1/
Added the JSFH solution to the draft
branch with 64d1225b09966af3b6b651fe01e79f0b7df7f246
@chad-earthscope , mostly for deployment, but jsfh generates html that has dependencies on google fonts and javascript from jquery, bootstrapcdn, etc. To future-proof this, perhaps these should be hosted locally on fdsn.org? Someone would have to remember to update the html whenever regenerated unless there is an automated way to do this.
To be honest, the html looks kind of weird in that there is an <html>
tag inside the main <html>
tag, ie looks like file is just copy/pasted by sphinx. It currently displays ok as far as I can tell, but...
@chad-earthscope , mostly for deployment, but jsfh generates html that has dependencies on google fonts and javascript from jquery, bootstrapcdn, etc. To future-proof this, perhaps these should be hosted locally on fdsn.org? Someone would have to remember to update the html whenever regenerated unless there is an automated way to do this.
Hhmm, that's not ideal in terms of dependencies but it is quite normal in terms of web technologies. Mitigating this by hosting the dependencies on fdsn.org is not an insignificant maintenance issue, and in my opinion more than negates the advantages of using "out of the box" solutions.
To be honest, the html looks kind of weird in that there is an tag inside the main tag, ie looks like file is just copy/pasted by sphinx. It currently displays ok as far as I can tell, but...
Yeah, it's generated HTML that is inserted with a raw include. I also think that's "normal"
I discovered an issue related to the generated documentation with JSFW: it is not included in the rendered PDF. Quite unfortunate.
One possibility is to use the "flat" template for JSFH, which I believe does not require JS, so reducing that dependency, and it may then render. This also means a user cannot collapse/expand or get "emphasis" when visiting link to a specific section.
One possibility is to use the "flat" template for JSFH, which I believe does not require JS, so reducing that dependency, and it may then render. This also means a user cannot collapse/expand or get "emphasis" when visiting link to a specific section.
Could we use the flat template to generate a PDF hosted on fdsn.org and use the existing to generate html for readthedocs ? Having a pdf just for long term stability would be desirable as well.
Well crud. JSFW's "flat" template does not allow the HTML-rendered FDSN Reserved Extra Headers to be included in a PDF.
Worth revisiting jsonschema2rst? It outputs rst, which hopefully would be pdf friendly in sphinx?
To make it look nice probably requires more work from us to customize, but maybe I can look at it in the next week or two...
Need to pull docs from json schema into rst.