Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't link to top of module documentation page #338

Open
malaire opened this issue Jul 4, 2020 · 1 comment
Open

Can't link to top of module documentation page #338

malaire opened this issue Jul 4, 2020 · 1 comment

Comments

@malaire
Copy link

malaire commented Jul 4, 2020

The top autogenerated H1 title of each module documentation page doesn't have id, so there is no way to link to top of module documentation page.

For example link https://package.elm-lang.org/packages/elm/core/latest/List doesn't go to top of the page when that link is used within package.elm-lang.org, and there is currently no id to create a link like https://package.elm-lang.org/packages/elm/core/latest/List#top-of-the-page

I suggest that an id is added to that title, which won't clash with any potential other ids. Perhaps _top_ would be OK, as it's unlikely any package would publish function named _top_.

top would clash with function top or type Top, and -top- would clash with example below, so those two can't be used.

## `top`
@malaire
Copy link
Author

malaire commented Jul 5, 2020

Or perhaps better fix would be to use the code shown at https://package.elm-lang.org/packages/elm/browser/latest/Browser-Dom#setViewport for every URL which doesn't have hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant