feat: Mettre à jour la configuration du backend et le formulaire de contact pour utiliser BASE_URL

This commit is contained in:
Boris Waaub
2026-03-16 16:00:19 +01:00
parent c392670539
commit bbfc0949c4
7 changed files with 14 additions and 11 deletions
@@ -1,9 +1,12 @@
{{ $form := .Page.Params.contactForm }}
{{ $baseURL := default "http://localhost" (getenv "BASE_URL") }}
{{ $normalizedBaseURL := strings.TrimSuffix "/" $baseURL }}
{{ $defaultContactAction := printf "%s:3001/contact" $normalizedBaseURL }}
<form id="contactForm" class="max-w-lg mx-auto p-6 bg-white rounded shadow" method="POST"
action="{{ $form.action | default "http://localhost:3001/contact" }}">
action="{{ $form.action | default $defaultContactAction }}">
<h3 class="text-2xl font-bold mb-4">{{ $form.title }}</h3>
{{ range $form.fields }}
<div class="mb-4">