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

Duplicate partial inclusion in head.html and head-end.html

Open chalin opened this issue 3 years ago • 2 comments

@aidanranney: this is a Docsy migration followup question concerning these issues:

  • HTML head meta elements are duplicated #745
  • Homepage has empty title/name for opengraph, twitter, and itemprop #744

Investigating this a bit I noticed the following:

(1) https://github.com/grpc/grpc.io/blob/main/layouts/partials/hooks/head-end.html contains:

{{ partial "google-analytics.html" . }}
{{ partial "meta.html" . }}
{{ partial "favicons.html" . }}

(2) But https://github.com/grpc/grpc.io-docsy/blob/e95da39c9933afe159b74b0d6b5b71407aab7d7d/layouts/partials/head.html:

  • Also contains
    • <meta> tags
    • A partial for favicons
    • A partial for Google analytics
  • As well as an include of head-end.html at the end of the file.

I'm sure that the duplication wasn't intentional, but what was the original intent? Was head-end.html created by mistake, or was the intent to customize head.html (by removing the elements that were being added to head-end.html)?

/cc @nate-double-u @celestehorgan

chalin avatar May 05 '21 12:05 chalin

👋 @chalin - I believe head-end.html was created purposefully to give an entry point documented in the code for extending head.html. I've lost the full context on the inclusion of those partials in that file, though at one point we were customizing the head.html partial, which went through iterations. These lines appear to be either missed in cleanup or a rebase.

aidanranney avatar May 05 '21 23:05 aidanranney

@chalin – I agree that this wasn't intentional. Removing the duplicated partials will 100% fix this.

celestehorgan avatar May 11 '21 15:05 celestehorgan