Documenter.jl icon indicating copy to clipboard operation
Documenter.jl copied to clipboard

Have the right anchors in documentation to help search engines

Open ViralBShah opened this issue 3 years ago • 1 comments

For example, when you google "julia kron doc", it sends you to the LinearAlgebra documentation at https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/. If possible, we should have the right anchors on the page so that search engines can send you directly to the relevant section on that page.

cc @Keno @StefanKarpinski

ViralBShah avatar Sep 06 '22 19:09 ViralBShah

Hmm. We put the name of each of the docstrings in a <header> tag (inside the <article> container of each docstrings), whereas maybe we should use <h1> instead (based on looking at mdn for <article> and <header>).

mortenpi avatar Sep 07 '22 03:09 mortenpi

Would leaving a name anchor, e.g. <a name="fragment"/> help here?

MarkNahabedian avatar Nov 29 '22 19:11 MarkNahabedian

Looking at the docs, the name attribute looks to be the same as id and seems to be pretty much deprecated. And we already have anchors with ids:

image

I still think that using a proper heading, instead of the <header> tag, should promote this for the search engines.

mortenpi avatar Nov 29 '22 20:11 mortenpi