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

Use a shared layout for the About, Showcase and Community pages?

Open chalin opened this issue 3 years ago • 2 comments

@aidanranney, was there a reason why a layout wasn’t used for the About, Showcase and Community pages? There's to be enough raw HTML boilerplate to warrant a layout IMHO:

{{< blocks/cover height="sm" color="primary" >}}
{{< page/header >}}
{{< /blocks/cover >}}

<div class="container l-container--padded">

<div class="row">
{{< page/toc collapsed=true placement="inline" >}}
</div>

<div class="row">
<div class="col-12 col-lg-8">

<!-- page content goes here -->

</div>

{{< page/toc placement="sidebar" >}}

</div>

{{< page/page-meta-links >}}

</div>

You might have mentioned why at some point, but I’m unsure whether this state of affairs is because of an inherent technical challenge / limitation or not.

chalin avatar Feb 22 '21 18:02 chalin

@chalin leaving these pages with this boilerplate was mainly to reduce the amount of nested complexity in these content files. AFAIK shortcodes can't be called within other shortcodes [though they can be "nested" in the same content file]. Partials can be called within shortcode templates, but that would have probably required that any desired Docsy shortcodes would be overridden as partials. I believe there also were some difficulties in getting Hugo to properly render these pages' table of contents with a nested shortcode/partial structure [unsure of whether this is an inherent limitation, or whether some kind of workaround exists].

aidanranney avatar Mar 03 '21 03:03 aidanranney

Thanks for the details @aidanranney. Will have to think about this more.

chalin avatar Mar 22 '21 15:03 chalin