From 3349024c90f8502c7b1fac7d8575211690279ce3 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 4 Oct 2022 19:25:30 +0100 Subject: [PATCH] fix: load community block/widget styles From `assets/scss/blocks/.scss` --- modules/wowchemy/layouts/authors/list.html | 4 ++-- modules/wowchemy/layouts/partials/functions/parse_block.html | 2 +- modules/wowchemy/layouts/partials/site_head.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/wowchemy/layouts/authors/list.html b/modules/wowchemy/layouts/authors/list.html index 56ae01be..d842448d 100644 --- a/modules/wowchemy/layouts/authors/list.html +++ b/modules/wowchemy/layouts/authors/list.html @@ -13,9 +13,9 @@
{{/* Show the About widget if an account exists for this user. */}} {{ if .File }} - {{ $widget := "widgets/about.html" }} + {{ $widget := "blocks/about.html" }} {{ $username := (path.Base .File.Dir) }}{{/* Alternatively, use `index .Params.authors 0` */}} - {{ $params := dict "root" $ "page" . "author" $username }} + {{ $params := dict "wcPage" $ "wcBlock" . "author" $username }} {{ partial $widget $params }} {{end}} diff --git a/modules/wowchemy/layouts/partials/functions/parse_block.html b/modules/wowchemy/layouts/partials/functions/parse_block.html index 8223f336..19d027a8 100644 --- a/modules/wowchemy/layouts/partials/functions/parse_block.html +++ b/modules/wowchemy/layouts/partials/functions/parse_block.html @@ -101,7 +101,7 @@ {{ $widget_class := printf "wg-%s" (replace (replace $block_type "." "-") "_" "-") }} -{{ $widget_config_file := printf "widgets/%s-config.html" $block_type }} +{{ $widget_config_file := printf "blocks/%s-config.html" $block_type }} {{ if templates.Exists $widget_config_file }} {{ $cfg := partial $widget_config_file $widget_args }} {{ $use_container = $cfg.use_container }} diff --git a/modules/wowchemy/layouts/partials/site_head.html b/modules/wowchemy/layouts/partials/site_head.html index af6630d8..f3cedcd0 100644 --- a/modules/wowchemy/layouts/partials/site_head.html +++ b/modules/wowchemy/layouts/partials/site_head.html @@ -158,7 +158,7 @@ {{/* Load WC community block styles */}} {{ $wc_block_styles := resources.Match "scss/blocks/**.scss" }} {{ with $wc_block_styles }} - {{ $wc_block_styles = $wc_block_styles | resources.Concat "css/wowchemy-blocks.css" }} + {{ $wc_block_styles = $wc_block_styles | resources.Concat "css/wowchemy-blocks.scss" | resources.ToCSS }} {{- if eq (getenv "WC_POST_CSS") "true" -}} {{- $wc_block_styles = $wc_block_styles | postCSS -}} {{- end -}}