gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
17.26k stars 715 forks source link

Only add Hex link to HTML docs when publishing to Hex #3020

Closed Nicd closed 4 months ago

Nicd commented 4 months ago

For whatever reason, not all packages may be in Hex.pm. Currently my package Gloss cannot be there as that name is squatted, but there may be other reasons, for example using a service like https://codecodeship.com that has its own Hex compatible repo.

The docs builder gleam docs build forcefully adds a link to Hex even if the package is not there: https://github.com/gleam-lang/gleam/blob/203801cd5c3a7d4498205a221248231210eddcc4/compiler-core/src/docs.rs#L75. It could be (rarely, but still) useful to be able to opt out of this link. For me, this causes my docs to link to the squatted package.

lpil commented 4 months ago

Let's only add this if the docs are being pushed to Hex