fix: Restructure les templates pour utiliser correctement les blocs Hugo
Some checks failed
Déploiement Hugo Staging / deploy-staging (push) Has been cancelled
Some checks failed
Déploiement Hugo Staging / deploy-staging (push) Has been cancelled
This commit is contained in:
parent
051df6e693
commit
8d89730a80
@ -1,25 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ .Title }} | {{ .Site.Title }}</title>
|
||||
<link rel="stylesheet" href="{{ `/css/style.css` | relURL }}">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<!-- Idéalement, le menu serait dans un partiel header.html -->
|
||||
<nav>
|
||||
<ul>
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ partial "header.html" . }}
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{{ .Content }}
|
||||
{{ block "main" . }}{{ .Content }}{{ end }}
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
<footer>
|
||||
{{ partial "footer.html" . }}
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
3
layouts/_default/list.html
Normal file
3
layouts/_default/list.html
Normal file
@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
Loading…
x
Reference in New Issue
Block a user