grpc.io icon indicating copy to clipboard operation
grpc.io copied to clipboard

Breadcrumbs use absolute links

Open chalin opened this issue 3 years ago • 0 comments

For example, visit https://grpc.io/docs/languages/, and inspect the breadcrumb for Documentation. This is the HTML associated with the breadcrumbs:

<nav aria-label="breadcrumb" class="d-print-none">
  <ol class="breadcrumb spb-1">
    <li class="breadcrumb-item"><a href="https://grpc.io/docs/">Documentation</a></li>
    <li class="breadcrumb-item active" aria-current="page"><a href="https://grpc.io/docs/languages/">Languages</a></li>
  </ol>
</nav>

This isn't an issue pre se, just a bit surprising: and it burdens the link checker when checking external links. Since we're already overriding the layout, we could switch to using relative links.

Resources:

  • https://github.com/google/docsy/blob/master/layouts/partials/breadcrumb.html, which uses .Permalink
  • https://gohugo.io/content-management/page-resources/#properties
  • https://www.w3.org/wiki/WebSchemas/Breadcrumbs seems to imply that relative links are ok
  • https://schema.org/BreadcrumbList
  • You can test your pages here: https://developers.google.com/search/docs/advanced/structured-data The Flutter site uses relative URLs and passes Google Rich Results Test and the Schema Markup Validator.

chalin avatar Aug 21 '21 19:08 chalin