fix: Restructure les templates pour utiliser correctement les blocs Hugo
Some checks failed
Déploiement Hugo Staging / deploy-staging (push) Has been cancelled

This commit is contained in:
MARTIN Julien 2025-05-27 10:50:07 +02:00
parent 051df6e693
commit 8d89730a80
2 changed files with 15 additions and 15 deletions

View File

@ -1,25 +1,22 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}"> <html lang="fr">
<head> <head>
<meta charset="utf-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Title }} | {{ .Site.Title }}</title> <title>{{ .Title }}</title>
<link rel="stylesheet" href="{{ `/css/style.css` | relURL }}"> <link rel="stylesheet" href="/css/style.css">
</head> </head>
<body> <body>
<header> <header>
<!-- Idéalement, le menu serait dans un partiel header.html --> {{ partial "header.html" . }}
<nav>
<ul>
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
</header> </header>
<main> <main>
{{ .Content }} {{ block "main" . }}{{ .Content }}{{ end }}
</main> </main>
{{ partial "footer.html" . }}
<footer>
{{ partial "footer.html" . }}
</footer>
</body> </body>
</html> </html>

View File

@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}