-
Notifications
You must be signed in to change notification settings - Fork 94
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
Simplified search index #1284
Simplified search index #1284
Conversation
8ae410f
to
900ace0
Compare
Format.fprintf output | ||
";\n\ | ||
const options = { keys: ['name', 'comment'] };\n\ | ||
var idx_fuse = new Fuse(documents, options);\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are making that the use of Fuse part of odoc (and not part of odoc_driver
) than I think we should add it to html_support_files
. Personally, I would prefer to have Fuse use part of odoc_driver
(although I'm fine with both solutions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a temporary grotty hack that I'd like to go away as soon as we've got proper sherlodoc support in ocaml.org. I'll see about hiding the options in the CLI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is something we are not going to keep, why not making it generated by the driver, from the output json file? This way, no need to hide it, and we have a guarantee no-one relies on it, if it happens to stay a bit longer before being removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This could be done after the beta release, but before the actual release!)
src/odoc/bin/main.ml
Outdated
| Some file, `JSON | ||
when not | ||
(Fpath.has_ext "json" (Fpath.v file) | ||
|| Fpath.has_ext "js" (Fpath.v file)) -> | ||
Error | ||
(`Msg | ||
"When generating a json index, the output must have a .json file \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or .js
in this PR
This is for search on ocaml.org.