numpy.org icon indicating copy to clipboard operation
numpy.org copied to clipboard

Make the headings on the landing page anchor links

Open rossbar opened this issue 3 years ago • 10 comments

It would be nice if the top-level headings (e.g. Ecosystem, Case Studies) were anchor links so that people could link to a specific portion of the page without having to scroll to get there.

rossbar avatar Feb 02 '22 18:02 rossbar

They are anchor links, we should just rewrite the URL when a user clicks on sidebar items so you know what IDs they are :)

https://scientific-python.org/ecosystem/#install

stefanv avatar Feb 02 '22 19:02 stefanv

They are anchor links, we should just rewrite the URL when a user clicks on sidebar items so you know what IDs they are :)

I'm a bit confused by this because AFAICT the numpy.org landing page doesn't have a sidebar. I was thinking something more along the lines of the little chain-link icon that appears when you hover over a section heading in some themes. Whether it's adding a sidebar or some other approach, it'd be nice to be able to easily create those anchor links to the section headings in the browser!

rossbar avatar Feb 02 '22 21:02 rossbar

This is addressed in https://github.com/scientific-python/scientific-python-hugo-theme/pull/116

stefanv avatar Feb 03 '22 07:02 stefanv

(I did not add the little chain-link icons, but it would be straightforward to do so, if desired.)

stefanv avatar Feb 03 '22 07:02 stefanv

See #553.

jarrodmillman avatar Feb 03 '22 18:02 jarrodmillman

This is a nice improvement but it doesn't seem to apply to the landing page where there is no sidebar. AFAICT there's still no way to click on/near the ECOSYSTEM heading or CASE STUDIES headings for example.

rossbar avatar Feb 03 '22 18:02 rossbar

Thanks for noticing those, I will fix them too!

EDIT: We can fix those in NumPy; since they're custom add-ins, we just have to make sure they have anchors specified as in:

<h2 id="this-heading-title">This Heading Title</h2>

If they use the hugo built-in mechanisms for generating headings, then headings automatically get IDs.

stefanv avatar Feb 03 '22 18:02 stefanv

Hi everyone, Is this issue still open? If yes would love to work on it.

tinaoberoi avatar Dec 19 '22 01:12 tinaoberoi

@tinaoberoi, feel free to work on this issue.

InessaPawson avatar Dec 21 '22 01:12 InessaPawson

Is this issue still open? If yes would love to work on it.

Yes please feel free. Note though that this may be better handled in the underlying scientific-python-hugo-theme

rossbar avatar Dec 21 '22 19:12 rossbar