jelly-beam / rebar3_ex_doc

rebar3 plugin for generating docs with ex_doc
Apache License 2.0
43 stars 13 forks source link

Navigation tree and `docs_config.js` missing when generating doc #62

Closed kianmeng closed 11 months ago

kianmeng commented 1 year ago
$ asdf current
elixir          1.13.4          /tmp/rebar3_ex_doc/.tool-versions
erlang          24.3.4.3        /tmp/rebar3_ex_doc/.tool-versions

Screenshot from 2023-08-12 12-13-47

starbelly commented 1 year ago

I wonder if this was a problem locally? When published, seems fine. I'm not sure what docs_config.js does exactly, so understanding that sounds like a good place to start.

Edit:

https://hexdocs.pm/ex_doc/Mix.Tasks.Docs.html#module-additional-javascript-config

This by default is generated server side via hexpm docs : https://github.com/hexpm/hexdocs/blob/2e281d4cf5e566df70d2142ad107425c9f927831/lib/hexdocs/bucket.ex#L60

kianmeng commented 1 year ago

I've tried with ex_doc, saw the same missing file error, but the navigation tree did show up by default, the PAGES tab was selected.

image

Perhaps this is an issue with ex_doc, should we report upstream?

starbelly commented 1 year ago

@kianmeng Yes that makes sense to me, there's nothing we can or should do here. I think ultimately ex_doc should generate the default javascript locally, although that will result in duplicate code between hexpm and ex_doc, but there's probably a simple solution 😄

paulo-ferraz-oliveira commented 12 months ago

@kianmeng, @starbelly, was this eventually reported upstream? I can replicate the "missing file" issue, but I'm not sure what that file is for, since all documentation is generated and navigation seems Ok.

kianmeng commented 12 months ago

@paulo-ferraz-oliveira I have submitted the issue upstream, https://github.com/elixir-lang/ex_doc/issues/1789. Thanks for the reminder.

josevalim commented 12 months ago

Yes, the file is never there by default. It is added by hex.pm with metadata about the docs, but otherwise, you can safely ignore it.

paulo-ferraz-oliveira commented 12 months ago

@kianmeng, given @josevalim's input, I'm not sure there's much we can do. What's intriguing, though, is that you seem to present a situation where the docs were not generated (this I couldn't replicate, even with the missing file - so probably not related (?)). @starbelly, thoughts?

starbelly commented 11 months ago

@paulo-ferraz-oliveira I agree with @josevalim, it's non-critical and doesn't impact experience locally AFAIK. It would only be noticed by inspecting the browser console, once again, locally.

I'm going to close this, yet please feel free to open if you feel differently.

paulo-ferraz-oliveira commented 11 months ago

I was able to replicate this locally when using _checkouts on a rebar3 project. Out of scope for fixing, but a reference nonetheless.