From 988c0cac7a2630ae5821c12e199b8f4a73e4be5f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 8 Jun 2026 14:49:02 +0100 Subject: [PATCH] Clean non-post theme sync - Remove newsletter-only policy from synced non-post layouts. - Strip feed blocks even when Liquid whitespace changes. - Keep copied layout comments accurate for sites without feeds. --- .github/actions/sync/shared-config.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/sync/shared-config.rb b/.github/actions/sync/shared-config.rb index 2d8c627b..facfaf23 100755 --- a/.github/actions/sync/shared-config.rb +++ b/.github/actions/sync/shared-config.rb @@ -451,11 +451,16 @@ def git(*args) "#{brewsh_assets_url}/assets/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}" end unless has_posts + updated_contents = updated_contents + .gsub("form-action 'self' https://buttondown.email;", "form-action 'self';") + .gsub("The `jekyll-feed` and `jekyll-seo-tag` plugins use", + "The `jekyll-seo-tag` plugin uses") + .gsub("control this behavior in the plugins,", "control this behavior in the plugin,") updated_contents = updated_contents.gsub( / - \n\s*\{% if site\.feed and site\.posts\.size > 0 -%\} - \n\s*\{% include feed\.html -%\} - \n\s*\{% endif -%\} + \n\s*\{%\s*if\s+site\.feed\s+and\s+site\.posts\.size\s*>\s*0\s*-?%\} + \n\s*\{%\s*include\s+feed\.html\s*-?%\} + \n\s*\{%\s*endif\s*-?%\} /x, "", )