From 995eba25941fd65856afd3c1099156105b5fdb08 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 13 Feb 2026 18:09:53 +0100 Subject: [PATCH] Initialisation du site. --- archetypes/blog.md | 0 content/_index.md | 7 +++++++ content/blog/_index.md | 7 +++++++ hugo.yaml | 15 +++++++++++++++ layouts/_partials/footer.html | 0 layouts/_partials/head.html | 3 +++ layouts/_partials/header.html | 1 + layouts/_partials/menu.html | 11 +++++++++++ layouts/all.html | 19 +++++++++++++++++++ layouts/baseof.html | 20 ++++++++++++++++++++ layouts/home.html | 6 ++++++ layouts/list.html | 7 +++++++ layouts/page.html | 4 ++++ layouts/section.html | 7 +++++++ layouts/single.html | 4 ++++ layouts/taxonomy.html | 7 +++++++ layouts/term.html | 7 +++++++ 17 files changed, 125 insertions(+) create mode 100644 archetypes/blog.md create mode 100644 content/_index.md create mode 100644 content/blog/_index.md create mode 100644 layouts/_partials/footer.html create mode 100644 layouts/_partials/head.html create mode 100644 layouts/_partials/header.html create mode 100644 layouts/_partials/menu.html create mode 100644 layouts/all.html create mode 100644 layouts/baseof.html create mode 100644 layouts/home.html create mode 100644 layouts/list.html create mode 100644 layouts/page.html create mode 100644 layouts/section.html create mode 100644 layouts/single.html create mode 100644 layouts/taxonomy.html create mode 100644 layouts/term.html diff --git a/archetypes/blog.md b/archetypes/blog.md new file mode 100644 index 0000000..e69de29 diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..b89fc32 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,7 @@ +--- +menus: main +title: Accueil +--- +# Alexis Lahouze + +Bienvenue ! diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..8826384 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,7 @@ +--- +outputs: + - html + - rss +menu: main +title: Blog +--- diff --git a/hugo.yaml b/hugo.yaml index d64bb1b..3bd65d2 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -3,4 +3,19 @@ baseURL: https://alexis.lahouze.org languageCode: fr-fr title: Alexis Lahouze +taxonomies: + author: author + category: categories + tag: tags + +outputs: + home: + - html + section: + - html + taxonomy: + - html + term: + - html + # vim: set tw=80 ts=4 sw=4 sts=4 nospell: diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html new file mode 100644 index 0000000..98f4a6d --- /dev/null +++ b/layouts/_partials/head.html @@ -0,0 +1,3 @@ +{{ with .OutputFormats.Get "rss" }} + {{ printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} +{{ end }} diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html new file mode 100644 index 0000000..c33dea1 --- /dev/null +++ b/layouts/_partials/header.html @@ -0,0 +1 @@ +{{ partial "menu.html" }} diff --git a/layouts/_partials/menu.html b/layouts/_partials/menu.html new file mode 100644 index 0000000..2121911 --- /dev/null +++ b/layouts/_partials/menu.html @@ -0,0 +1,11 @@ + diff --git a/layouts/all.html b/layouts/all.html new file mode 100644 index 0000000..128ce10 --- /dev/null +++ b/layouts/all.html @@ -0,0 +1,19 @@ +{{ define "main" }} + {{ if eq .Kind "home" }} + {{ .Content }} + {{ range .Site.RegularPages }} +

{{ .LinkTitle }}

+ {{ end }} + {{ else if eq .Kind "page" }} +

{{ .Title }}

+ {{ .Content }} + {{ else if in (slice "section" "taxonomy" "term") .Kind }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} + {{ else }} + {{ errorf "Unsupported page kind: %s" .Kind }} + {{ end }} +{{ end }} diff --git a/layouts/baseof.html b/layouts/baseof.html new file mode 100644 index 0000000..766a844 --- /dev/null +++ b/layouts/baseof.html @@ -0,0 +1,20 @@ + + + + {{ partial "head.html" . }} + + +
+ {{ partial "header.html" . }} +
+
+ {{ block "main" . }} + Ce bloc sera remplacé par le contenu de la directive "define" + correspondante dans le template depuis lequel celui-ci est appliqué. + {{ end }} +
+ + + diff --git a/layouts/home.html b/layouts/home.html new file mode 100644 index 0000000..7510ec3 --- /dev/null +++ b/layouts/home.html @@ -0,0 +1,6 @@ +{{ define "main" }} + {{ .Content }} + {{ range .Site.RegularPages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }} diff --git a/layouts/list.html b/layouts/list.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/layouts/list.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }} diff --git a/layouts/page.html b/layouts/page.html new file mode 100644 index 0000000..4cfd224 --- /dev/null +++ b/layouts/page.html @@ -0,0 +1,4 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} +{{ end }} diff --git a/layouts/section.html b/layouts/section.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/layouts/section.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }} diff --git a/layouts/single.html b/layouts/single.html new file mode 100644 index 0000000..4cfd224 --- /dev/null +++ b/layouts/single.html @@ -0,0 +1,4 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} +{{ end }} diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html new file mode 100644 index 0000000..5ddfb92 --- /dev/null +++ b/layouts/taxonomy.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Data.Terms.ByCount }} +

{{ .Page.LinkTitle }} ({{ .Count }})

+ {{ end }} +{{ end }} diff --git a/layouts/term.html b/layouts/term.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/layouts/term.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }}