From a2cbf5207bfb8356fc6efc4815c2710d99df80aa Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Mon, 27 Apr 2026 20:20:34 +0700 Subject: [PATCH] Fix: disable Tina CMS during build to avoid clientId/token error --- astro.config.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index c71a507..cd6a0cc 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,11 +6,15 @@ import path from 'path' const __dirname = path.dirname(fileURLToPath(import.meta.url)) +// Only enable Tina CMS when TINA_TOKEN is provided AND we're not in build mode +const isBuild = process.argv.includes('build') +const tinaEnabled = !isBuild && !!process.env.TINA_TOKEN + export default defineConfig({ site: 'https://example.com', integrations: [ tina({ - enabled: !!process.env.TINA_TOKEN, + enabled: tinaEnabled, sidebar: { partials: [], },