chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
582 stars 267 forks source link

Refactor & modularize base template #299

Closed onweru closed 2 years ago

onweru commented 2 years ago

This PR makes it possible to override the head and scripts' templates without the need to override the entire baseof.html.

Changes / fixes

These changes were possible while keeping the templates as DRY as possible. I used return values for the main script and styles bundle so that their definitions can be compartmentalized while still being accessible from other templates.

@rootwork, I reckon this is a good start upon which we can iterate & improve.

Screenshots (if applicable)

(prefer animated gif)

Checklist

Ensure you have checked off the following before submitting your PR.

chipzoller commented 2 years ago

This is beyond my competency level to provide a meaningful review. @rootwork can you please review?

rootwork commented 2 years ago

Reading through it things look great, but I won't be able to fully test until Monday.