-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More fields in @doc-json
#1134
Comments
I don't know if it is entirely related, but this news: Suggests that the DB exists in Json, would it be possible to get it? The main problem with the |
So, coming back to this, I think we can address a few of these for the v3.0 release, mostly because a lot of these were tricky prior to the existence of
An alternative to putting all of these fields into the existing json output files, is that we coud output in the json the path to the top-level module. Unless you've got a very unusual layout (e.g. in the |
What would be the advantage with respect to having the very same information in the JSON? Having two files means that we have to parse two different files for extracting information (potentially with different formats?).
Would the DB still be a JS file? |
(in any case, one file is metadata for a set of pages, while the other is metadata for a single page! So doesn't it make sense to have separated files?)
Currently, the driver only generate a JS file as odoc-driver does not provide support for server-side search out of the box.
|
What do you mean with "page title"? So, we would need to define a new notion just to put in in the field... I think it makes more sense to build your own idea of a title from the breadcrumbs! |
For modules, I've used "module Name" as a page title (as is done in the default odoc generated pages by I generally think its good practice for webpages to have a clearly visible header (i.e. what is on this page?) and I feel the look of ocaml.org is a bit lacking in that regard. |
My bad, for some reason I was confused by the fact that ocaml.org does not show the header, and a testing error on my side. I'll open a PR shortly with that. Thanks for your report! |
As mentioned in the discuss.ocaml post, I would appreciate a few extra fields in the generated JSON files to make integrating them in my website easier. jonludlam suggested I open an issue for these here as well:
title
field with the page title (currently obtainable frombreadcrumbs[-1].name
package
field with the name of the current package (currently can be obtained from the path of the generated doc)version
field with the version of the current package (I'm building versioned docs). Currently I can only obtain this through git ref names.objects
fields with the list and type (val, module, type, module type...) of all objects defined in the current filesherlodoc
field indicating whether or not sherlodoc was present (and if so, the relative path from the current file to thedb.js
file).The text was updated successfully, but these errors were encountered: