Initialisation du site.

This commit is contained in:
2026-02-13 18:09:53 +01:00
committed by Alexis Lahouze
parent 14e39093cf
commit 995eba2594
17 changed files with 125 additions and 0 deletions
View File
+3
View File
@@ -0,0 +1,3 @@
{{ with .OutputFormats.Get "rss" }}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }}
+1
View File
@@ -0,0 +1 @@
{{ partial "menu.html" }}
+11
View File
@@ -0,0 +1,11 @@
<nav>
<ul>
{{- range site.Menus.main }}
<li>
<a {{ with .Params.class -}} class="{{ . }}" {{ end -}} href="{{ .URL }}">
{{ .Name }}
</a>
</li>
{{- end }}
</ul>
</nav>
+19
View File
@@ -0,0 +1,19 @@
{{ define "main" }}
{{ if eq .Kind "home" }}
{{ .Content }}
{{ range .Site.RegularPages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ else if eq .Kind "page" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ else if in (slice "section" "taxonomy" "term") .Kind }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ else }}
{{ errorf "Unsupported page kind: %s" .Kind }}
{{ end }}
{{ end }}
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<header>
{{ partial "header.html" . }}
</header>
<main>
{{ block "main" . }}
Ce bloc sera remplacé par le contenu de la directive "define"
correspondante dans le template depuis lequel celui-ci est appliqué.
{{ end }}
</main>
<footer>
{{ partial "footer.html" . }}
</footer>
</body>
</html>
+6
View File
@@ -0,0 +1,6 @@
{{ define "main" }}
{{ .Content }}
{{ range .Site.RegularPages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}
+7
View File
@@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}
+4
View File
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
+7
View File
@@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}
+4
View File
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
+7
View File
@@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Data.Terms.ByCount }}
<h2><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> ({{ .Count }})</h2>
{{ end }}
{{ end }}
+7
View File
@@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}