ex_doc
ex_doc copied to clipboard
Add reference_apps
The idea is to allow a list of apps to be given. Then we will support autocompleting the modules and functions of additional apps in the autocompletion bar. They can also be searched but only on their name (not their documentation otherwise it may get too expensive).
Once clicked, we will navigate to the page of the module/function in another completely different URL (as we do for regular links). This can be used by ecto
and ecto_sql
to include each other entries. Or by Elixir to include entries for Logger, Mix, etc.
Should we consider to handle them then as target="_blank"
?
To make it clear you'll leave the docs of the current app.
Or probably also style it with CSS as some kind of external.
Yes and yes!
Is there an idea of how this would end up being supported? Would the search for these get build when the docs are built? If so where would it get the search results? Asking because I'd be interested in contributing this if I can get some pointers on how we'd like it implemented.
There are two steps I think:
-
Make them show up in autocomplete and clicking on it takes you to a separate project on hexdocs.pm
-
Directly embed their content so they can also be searched for
I would start with step 1. I also think we should stop limiting autocomplete to 5 elements. We should make that list scrollable for sure.
I opened up an issue #1637 that may also be a place to start, which I think can be implemented quite easily. Essentially allowing for links of type :custom
or :external
and having them built based on configuration in the mix config. Then reference_apps
could just add to that list.
Closing in favor of the PR, as we are discussing the viability of moving this forward. :)