-
Notifications
You must be signed in to change notification settings - Fork 6
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
Awesome search bar and question about enabling it with multiple packages #29
Comments
You already have this if you build your doc with My reasoning when writing the dune rules was that |
However, I think it might be beneficial for this behavior to configurable in dune. This needs to be done in dune, not sherlodoc. I am not sure of what the exact look of such config would be. |
Thank you for your response 😃 doc-newThanks for letting me know about it, I had missed it. Earlier today I attempted to build a doc with
Later, I noticed a new directory $ ls _build/default/_doc_new/
html index odoc
$ find _build/default/_doc_new -path '*.html'
(no hit) Could this be due to the following in my root dune file? (env
(dev
(odoc
(warnings fatal)))) Could pulling dependencies cause this command to fail because more files are processed? If so, would it be reasonable to request that Search bar in home pageAside from the multi-package question, would there be any downside to including the search bar on the odoc's home page? For example, compare: https://mbarbin.github.io/error-log/ (doesn't have the search bar) Multi packageOnce I can successfully use For instance, consider the project I originally linked, https://mbarbin.github.io/eio-rpc/ :
What happens when you select a search hit in a dependency btw? Does it redirect somewhere? Dune configurationRegarding the configuration, I'm typically used to put (env
(dev
(odoc
(mode new)))) I realize my feedback is starting to sound like a Christmas wish list - my apologies! As a casual and quite happy user, I'm more than willing to try out more things if you find my feedback valuable. Thanks again for all your hard work! |
Yes I agree! Libraries that are developed and documented together should be cross-searchable, since they are intended to be used in conjunction :) The odoc bland listing of packages on the homepage is inconvenient to navigate as it provides little guidance, a search bar would be very welcome here (cc @panglesd and @Julow as I don't know how feasible this is on odoc side?) My understanding is that the The generation of (Btw, long time no see @mbarbin, I hope you are doing great! Would love to catch up over a drink if you ever come by Paris :) ) |
That is the main reason that there is a new rule, the new rule have a different structure, which meant that if they just replaced the old rules it would break a lot of things. They also have the difference of best use case we mentionned.
Your may be right, but I am not sure this is way your doc-new folder is empty. If your diagnosis is right this could likely be done in dune with minimal effort, but @jonludlam would probably be a better person to ask that question to. Could you try removing the
The reason its not here is that this is not an odoc page, but a page generated by dune : https://github.com/ocaml/dune/blob/581f852c5144b03be0067a93289e90262fa8cbc6/src/dune_rules/odoc.ml#L512 We could add a search bar to it, but it would means duplicating (and re-doing) some work from odoc. This is unfortunate because I agree it would be nice ergonomics. Maybe a good way to do that would be to remove this html page and replace it by a real odoc page (an mld generated by dune)
I think you likely need
Putting it in dune-project sounds right. It would not be choosing between doc-new and doc, but a sherlodoc-specific settings to choose the scope of the search bar. Maybe the default would be a large scope with the option to have multiple smaller search bar for very large projects. |
This page is generated by the driver and it should be feasible dune-side. (or is generated by Odoc but there's no reason to keep it that way) |
This should already be implemented, modulo bugs - we're supposed to pass the 'quiet' flag to external libs (things that come from opam rather than in your tree), and this should suppress the
Note that in doc-new odoc generates all the pages, so this isn't an issue. |
Yeah I can confirm that no html files are generated by Would it be possible for |
Just to bring up another (unrelated?) issue that's been adding to my confusion: there are warnings that still pop up and don't cause ...
Warning: Failed to resolve reference ... I vaguely remember reading about this issue somewhere, but can't recall where exactly. For now, I've been ignoring them (without trying to filter them out) in the hope that they'll be removed eventually.
Judging by the output of dune build @doc-new on dependencies (verbose), it doesn't seem like this is working as expected at the moment. |
Thank you so much for looking into my build issue, @art-w, and for publishing a working build! That's really kind of you. The
Thanks! You know, keeping caml and currying on. Absolutely! I'll make sure to reach out on my next visit to Paris :) |
This is rather annoyingly hard to do - and one of the reasons the layout of |
Drat! The issue is in dune - open it there and assign it to me please! |
I found this again, I was referring to this discussion between @jonludlam and @Julow ocaml/odoc#784 (comment) I'll add a +1 to the linked issue there. Thanks! |
Hello,
I spotted the new sherlodoc's search bar in dune's 3.14 changelog and couldn't wait to try it out. I've now enabled it in a project.
That project has multiple opam packages. Right now, each package gets its own search bar. Have you considered adding a global search bar on the index page that covers all packages? I haven't given it much thought, and merging the indexes might lead to problems, so perhaps this would need consideration (I don't know, just a thought).
Thank you for this feature and its smooth integration with dune. The setup was a breeze! I appreciate all your efforts!
The text was updated successfully, but these errors were encountered: