From b948c9a456e58458a7697115e1d7d584bae1c65d Mon Sep 17 00:00:00 2001 From: Tim Hsueh Date: Wed, 2 Sep 2026 10:57:11 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8D=87=E7=B4=9A=E5=BE=8C=E6=89=93?= =?UTF-8?q?=E7=A3=A8=E2=80=94=E2=80=94=E9=97=9C=E9=96=89=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=20variant=20processor=20=E8=88=87=E6=A8=A3?= =?UTF-8?q?=E5=BC=8F=E8=A8=BB=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - active_storage.variant_processor = :disabled:本專案無任何 附件,消除每次 production 開機的 image_processing 提示噪音 - site.scss 補註記:U3 之後所有頁面的 body_class 都以 ! 尾綴 Tailwind 背景覆蓋此規則,bg.jpg 底圖目前不會是任何頁面的 可見背景(保留為基底 fallback)——避免後人誤以為該機制生效 --- app/assets/stylesheets/site.scss | 9 ++++++++- config/environments/production.rb | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/site.scss b/app/assets/stylesheets/site.scss index aebe141..6c8dae4 100644 --- a/app/assets/stylesheets/site.scss +++ b/app/assets/stylesheets/site.scss @@ -7,7 +7,14 @@ body { /* dart-sass has no sprockets `asset-url()` helper (it would pass the function through verbatim and the browser could not resolve it), so the fingerprinted URL is injected from the layout as a custom property. - See app/views/layouts/application.html.erb. */ + See app/views/layouts/application.html.erb. + + Heads-up: since the U3 Tailwind pass, every page view sets a + content_for :body_class with a `!`-suffixed Tailwind background + (bg-gradient-to-b!/bg-none! etc.), which always wins over this + unlayered rule — so this bg.jpg is currently never the visible + backdrop on any page. Kept as the base-layer fallback; verified + pixel-identical before/after the dartsass switch. */ background-image: var(--site-bg-image); background-repeat: repeat; background-attachment: fixed; diff --git a/config/environments/production.rb b/config/environments/production.rb index 1050129..6929ead 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -28,6 +28,10 @@ # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local + # This app has no Active Storage attachments at all; without this, every + # production boot logs a "Generating image variants require the + # image_processing gem" notice. + config.active_storage.variant_processor = :disabled # Assume all access to the app is happening through a SSL-terminating reverse proxy. # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.