funkydan2 / hugo-kiera

Kiera - A Hugo Theme for writing
https://hugo-kiera.netlify.app
MIT License
71 stars 53 forks source link

Use partial instead of partialCached #72

Closed jsumners closed 10 months ago

jsumners commented 10 months ago

I am working to de-duplicate some CSS in shortcodes by adding block like the following to my site header template:

{{ if .HasShortcode "foo" -}}
<link rel="stylesheet" type="text/css" href="/css/foo.css" />
{{- end }}

I spent a while churning trying to figure out why I was sometimes getting the right render, but most times not. I discovered that making the change in this PR fixes the issue. Basically, not every page is going to include all stylesheets, and the first page that actually gets rendered was priming the partial cache.

netlify[bot] commented 10 months ago

Deploy Preview for hugo-kiera ready!

Name Link
Latest commit bc129d591c63fd267d5295f8ea0fd9ca9ec05a6e
Latest deploy log https://app.netlify.com/sites/hugo-kiera/deploys/652fd85a656a9a0008f14a29
Deploy Preview https://deploy-preview-72--hugo-kiera.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

funkydan2 commented 10 months ago

Looks good to me.