diff --git a/README.md b/README.md index 2351517f..8c28afdb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ - 🙋‍♀️ **Have a question?** - **Chat with us now on [Discord](https://discord.gg/z8wNYzb)** or explore the [Troubleshooting Guide]() and [Q&A Forum](https://github.com/wowchemy/wowchemy-hugo-themes/discussions) - _Also, check out [Hugo Forum](https://discourse.gohugo.io) for Hugo Qs and [Netlify Forum](https://answers.netlify.com/) for Netlify Qs_ -- 🐦 Share your Wowchemy site with the community on Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=(%23MadeWithWowchemy%20OR%20%23MadeWithAcademic)&src=typed_query) +- 🐦 Share your Wowchemy site with the community on Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%23MadeWithWowchemy&src=typed_query) - 🗳 [Take the survey and help us improve #OpenSource](https://forms.gle/NioD9VhUg7PNmdCAA) - ⬆️ **Updating?** View the [Update Guide](https://wowchemy.com/docs/hugo-tutorials/update/) and [Release Notes](https://github.com/wowchemy/wowchemy-hugo-themes/releases) - 🚀 [Contribute improvements](./.github/contributing.md) or [suggest improvements](https://github.com/wowchemy/wowchemy-hugo-themes/issues) diff --git a/package.json b/package.json index 0a490c77..1bdfac5d 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "lint:js:fix": "eslint '*/**/*.{js,ts,tsx}' --fix", "lint:style": "stylelint '*/**/*.{css,scss}'", "format": "prettier --write \"*.{css,js,json,md,scss}\" \"./**/*.{css,js,json,md,scss}\"", - "stylelint-conflict-check": "stylelint-config-prettier-check" + "stylelint-conflict-check": "stylelint-config-prettier-check", + "update:starters": "hugo mod get -u ./..." } } diff --git a/wowchemy/layouts/partials/widget_page.html b/wowchemy/layouts/partials/widget_page.html index 281d18bd..48f68095 100644 --- a/wowchemy/layouts/partials/widget_page.html +++ b/wowchemy/layouts/partials/widget_page.html @@ -26,7 +26,12 @@ {{ end }} {{/* Load page sections */}} +{{ $has_mermaid := false }} {{ range $index, $st := where ( $headless_bundle.Resources.ByType "page" ) ".Params.active" "!=" false }} + {{ if .Page.Store.Get "has_mermaid" }} + {{ $has_mermaid = true }} + {{ end }} + {{/* Begin widget styling */}} {{ $bg := $st.Params.design.background }} {{ $style := "" }} @@ -152,3 +157,9 @@ {{if $use_container}}{{end}} {{ end }} + +{{/* Workaround to make Hugo's .Page.Store.Set cascade up to the parent of headless pages */}} +{{ if $has_mermaid }} + {{ .Page.Store.Set "has_mermaid" true }} +{{ end }} +