Add coming soon page and publish toggle

This commit is contained in:
2026-04-04 18:57:18 +02:00
parent 8fb5ff41c3
commit 051b9c2102

View File

@@ -18,14 +18,8 @@ echo Modalita selezionata: DEMO PUBBLICATA
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$path = '%CADDYFILE%';" ^
"$content = Get-Content -Raw $path;" ^
"$pattern = '(?s)%DOMAIN% \{.*?\}';" ^
"$replacement = @'" ^
%DOMAIN% {
root * %LIVE_ROOT%
try_files {path} /index.html
file_server
}
'@;" ^
"$pattern = '(?ms)^%DOMAIN% \{[\s\S]*?^\}';" ^
"$replacement = '%DOMAIN% {' + [Environment]::NewLine + ' root * %LIVE_ROOT%' + [Environment]::NewLine + ' try_files {path} /index.html' + [Environment]::NewLine + ' file_server' + [Environment]::NewLine + '}';" ^
"$updated = [regex]::Replace($content, $pattern, $replacement);" ^
"Set-Content -Path $path -Value $updated -Encoding UTF8;"
if errorlevel 1 (
@@ -39,13 +33,8 @@ echo Modalita selezionata: COMING SOON
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$path = '%CADDYFILE%';" ^
"$content = Get-Content -Raw $path;" ^
"$pattern = '(?s)%DOMAIN% \{.*?\}';" ^
"$replacement = @'" ^
%DOMAIN% {
root * %COMING_SOON_ROOT%
file_server
}
'@;" ^
"$pattern = '(?ms)^%DOMAIN% \{[\s\S]*?^\}';" ^
"$replacement = '%DOMAIN% {' + [Environment]::NewLine + ' root * %COMING_SOON_ROOT%' + [Environment]::NewLine + ' file_server' + [Environment]::NewLine + '}';" ^
"$updated = [regex]::Replace($content, $pattern, $replacement);" ^
"Set-Content -Path $path -Value $updated -Encoding UTF8;"
if errorlevel 1 (