ianmackenzie / elm-units

Simple, safe and convenient unit types and conversions for Elm
https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/
BSD 3-Clause "New" or "Revised" License
85 stars 14 forks source link

documentation links broken #36

Open harmboschloo opened 5 years ago

harmboschloo commented 5 years ago

In Quantity.elm there are a number of links to #multiplication-and-division, but that tag doesn't exist.

Note that there are [other forms of multiplication](/#multiplication-and-division)!

ianmackenzie commented 5 years ago

Argh, good catch, thanks! I think that probably worked when previewing docs locally but doesn't work on the actual Elm package site. The intent is to link to

https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/#multiplication-and-division

(a section of the README) but using a link of /#multiplication-and-division from

https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/Quantity

leads to

https://package.elm-lang.org/#multiplication-and-division

instead, which obviously doesn't work. Using #multiplication-and-division (without the slash) also won't work since that will presumably try to link to

https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/Quantity#multiplication-and-division

Now that I look more closely, though, even the desired link doesn't work since the Elm package site doesn't seem to support directly linking to an anchor (clicking on an anchor link within the README once it's loaded works fine, but not entering it in the URL - logged as https://github.com/elm/package.elm-lang.org/issues/304). So there may not be a nice way to do it...might have to refactor the documentation to move that section from the README to the Quantity module page instead.

ianmackenzie commented 5 years ago

I'm actually also currently working on a framework for making nice 'guides' for Elm packages (with code examples, inline interactive demos etc.). So perhaps the best solution is to move much of the high-level explanatory content that is currently in the README to a separate guide, and then link to that from the README/module documentation pages etc.