grpc / grpc.io

Repository for the gRPC website and documentation
https://grpc.io
Other
414 stars 432 forks source link

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

Open chalin opened 3 years ago

chalin commented 3 years ago

@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.

aidanranney commented 3 years ago

@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].

chalin commented 3 years ago

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