When running scala-cli doc . -o api it generates the expected folder containing the documentation-website, however when opening the index.html file in a web-browser I cannot open links to other parts of the documentation by simply clicking on them. The strange thing is that it works as expected when hovering over a link, and selecting “Open in a new tab”. https://imgur.com/UKDjsjX
Another issue is that the links to other parts under the Value members and Type members sections are linking to scala-lang.org/api, which of course simply yields a page not found response.
Opening a server with python3 -m http.server in the api directory does solve the links in the tree not working, but the links to scala-lang.org remain.
Could someone please explain how to compile the documentation using scala-cli to fix the issues described above (without running opening a server if possible)?
I had the same issue while testing scaladoc locally. I did not track down the issue with local links, but I’m chiming in with moral support. “Shouldn’t this just work?”
Yeah, I agree, it should “Just Work” ™. There are two issues here: 1) The defaults should be set so that it works out of the box. And 2) There should better docs to help understand how to set the parameters to scaladoc via scala-cli, as there is not much info nor examples here: Doc | Scala CLI
I have tried to find ways to do this but still wonder:
How to forward the right options to scaladoc via scala-cli so that all links in the static site generated works using the local file system via my local browser (if possible?)?
Really good that you also contributed with an issue:
I suggest that you add a permissive OSS licence to your repo (if that is your intent). Preferably Apache 2.0 so it is compliant with the scala dotty repo license…