containernetworking / cni.dev

CNI website
https://cni.dev
Apache License 2.0
48 stars 55 forks source link

Correct Edit on GitHub button and breadcrumbs #30

Closed nate-double-u closed 3 years ago

nate-double-u commented 3 years ago

The CNI section has the "Edit on GitHub" button and breadcrumbs nav present on most of its pages, but it is entirely missing on the pages in the Plugins section.

nate-double-u commented 3 years ago

For example:

Present here: https://www.cni.dev/cni/dco/ but not here: https://www.cni.dev/cni/spec/ or here: https://www.cni.dev/plugins/pkg/ns/

It isn't present in any of the Plugins pages, and is present in most (but not all) of the CNI docs pages.

nate-double-u commented 3 years ago

Inviting @celestehorgan to discuss.

You had mentioned checking section.html’s template -- in this case it is identical to single.html (which may be its own problem). I agree that the issue is likely how the context is getting passed in, but I'm having trouble seeing where (my kingdom for a hugo debugger).

nate-double-u commented 3 years ago

Adding a {{ printf "%#v" . }} to the <header> of ~single.html~ section.html does generate some interesting results:

On http://localhost:1313/plugins/pkg/ns/:

Screen Shot 2020-11-10 at 3 22 41 PM

But on http://localhost:1313/cni/code-of-conduct/ it generates no change:

Screen Shot 2020-11-10 at 3 23 35 PM

Telling us that the incorrectly functioning breadcrumb/edit button are getting routed through the ~single.html~ section.html file. Now to hunt down where and why single.html gets called instead of section.html

nate-double-u commented 3 years ago

Sorry, updated the filenames for the test.

nate-double-u commented 3 years ago

See PR #43, restructuring the documentation into a much simpler, flatter structure has sorted this issue.