From 9174093aaab24ad9f59263560711133c39cd8962 Mon Sep 17 00:00:00 2001 From: bojemoi Date: Fri, 6 Feb 2026 20:11:25 +0100 Subject: [PATCH] Switch to PaperMod theme with dark mode, search, tags --- .gitea/workflows/hugo-deploy.yml | 2 +- .gitmodules | 3 ++ content/_index.md | 5 --- content/posts/gitea-actions-alpine-hugo.md | 2 ++ content/posts/premier-article.md | 2 ++ content/search.md | 5 +++ hugo.toml | 39 ++++++++++++++++++++++ layouts/_default/baseof.html | 21 ------------ layouts/_default/list.html | 12 ------- layouts/_default/single.html | 9 ----- layouts/index.html | 12 ------- static/css/style.css | 11 ------ themes/PaperMod | 1 + 13 files changed, 53 insertions(+), 71 deletions(-) create mode 100644 .gitmodules delete mode 100644 content/_index.md create mode 100644 content/search.md delete mode 100644 layouts/_default/baseof.html delete mode 100644 layouts/_default/list.html delete mode 100644 layouts/_default/single.html delete mode 100644 layouts/index.html delete mode 100644 static/css/style.css create mode 160000 themes/PaperMod diff --git a/.gitea/workflows/hugo-deploy.yml b/.gitea/workflows/hugo-deploy.yml index bd80eb0..8da89de 100644 --- a/.gitea/workflows/hugo-deploy.yml +++ b/.gitea/workflows/hugo-deploy.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repo run: | - git clone --depth 1 --branch "${GITHUB_REF_NAME}" "http://gitea:3000/${GITHUB_REPOSITORY}.git" . + git clone --depth 1 --branch "${GITHUB_REF_NAME}" --recurse-submodules --shallow-submodules "http://gitea:3000/${GITHUB_REPOSITORY}.git" . - name: Build Hugo site run: hugo --minify diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..89af1b0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/PaperMod"] + path = themes/PaperMod + url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/content/_index.md b/content/_index.md deleted file mode 100644 index 22e2061..0000000 --- a/content/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Accueil" ---- - -Bienvenue sur le blog de Bojemoi Lab. diff --git a/content/posts/gitea-actions-alpine-hugo.md b/content/posts/gitea-actions-alpine-hugo.md index 5786309..ccb49f8 100644 --- a/content/posts/gitea-actions-alpine-hugo.md +++ b/content/posts/gitea-actions-alpine-hugo.md @@ -2,6 +2,8 @@ title: "CI/CD Hugo avec Gitea Actions et Alpine" date: 2026-02-06T19:00:00+00:00 draft: false +tags: ["gitea", "ci-cd", "alpine", "hugo", "devops"] +summary: "Comment ce blog se déploie tout seul en moins de 15 secondes avec un pipeline Alpine + Hugo minimaliste." --- Comment ce blog se déploie tout seul en moins de 15 secondes, avec un pipeline minimaliste. diff --git a/content/posts/premier-article.md b/content/posts/premier-article.md index e0a5708..e65e832 100644 --- a/content/posts/premier-article.md +++ b/content/posts/premier-article.md @@ -2,6 +2,8 @@ title: "Premier article" date: 2026-02-06 draft: false +tags: ["hugo", "blog"] +summary: "Bienvenue sur le blog Bojemoi Lab. Présentation de la stack technique." --- Bienvenue sur le blog Bojemoi Lab. diff --git a/content/search.md b/content/search.md new file mode 100644 index 0000000..fea5099 --- /dev/null +++ b/content/search.md @@ -0,0 +1,5 @@ +--- +title: "Recherche" +layout: "search" +placeholder: "Rechercher un article..." +--- diff --git a/hugo.toml b/hugo.toml index f89ae8a..205a4d7 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,9 +1,48 @@ baseURL = 'https://blog.bojemoi.me/' languageCode = 'fr' title = 'Bojemoi Blog' +theme = 'PaperMod' [params] + env = 'production' description = "Blog technique - Bojemoi Lab" + author = 'Bojemoi' + defaultTheme = 'auto' + ShowReadingTime = true + ShowShareButtons = false + ShowPostNavLinks = true + ShowBreadCrumbs = true + ShowCodeCopyButtons = true + ShowToc = true + + [params.homeInfoParams] + Title = "Bojemoi Lab" + Content = "Blog technique - Infrastructure, DevOps, S\u00e9curit\u00e9" + + [[params.socialIcons]] + name = 'gitea' + url = 'https://gitea.bojemoi.me' [markup.goldmark.renderer] unsafe = true + +[markup.highlight] + style = 'monokai' + +[[menu.main]] + name = 'Articles' + url = '/posts/' + weight = 10 + +[[menu.main]] + name = 'Tags' + url = '/tags/' + weight = 20 + +[[menu.main]] + name = 'Search' + url = '/search/' + weight = 30 + +[outputs] + home = ['HTML', 'RSS', 'JSON'] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index 2138a75..0000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - {{ block "title" . }}{{ .Site.Title }}{{ end }} - - - -
-

{{ .Site.Title }}

-

{{ .Site.Params.description }}

-
-
- {{ block "main" . }}{{ end }} -
- - - diff --git a/layouts/_default/list.html b/layouts/_default/list.html deleted file mode 100644 index 6e6252f..0000000 --- a/layouts/_default/list.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }} -{{ define "main" }} -

{{ .Title }}

- {{ .Content }} - {{ range .Pages }} -
-

{{ .Title }}

- -

{{ .Summary }}

-
- {{ end }} -{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html deleted file mode 100644 index 86c3141..0000000 --- a/layouts/_default/single.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }} -{{ define "main" }} -
-

{{ .Title }}

- - {{ .Content }} -
- ← Retour -{{ end }} diff --git a/layouts/index.html b/layouts/index.html deleted file mode 100644 index d9b2aba..0000000 --- a/layouts/index.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ define "title" }}{{ .Site.Title }}{{ end }} -{{ define "main" }} - {{ .Content }} -

Articles

- {{ range site.RegularPages }} -
-

{{ .Title }}

- -

{{ .Summary }}

-
- {{ end }} -{{ end }} diff --git a/static/css/style.css b/static/css/style.css deleted file mode 100644 index e4d0ea2..0000000 --- a/static/css/style.css +++ /dev/null @@ -1,11 +0,0 @@ -* { margin: 0; padding: 0; box-sizing: border-box; } -body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; max-width: 800px; margin: 0 auto; padding: 2rem; color: #333; } -header { margin-bottom: 2rem; border-bottom: 2px solid #eee; padding-bottom: 1rem; } -header h1 a { color: #333; text-decoration: none; } -header p { color: #666; } -article { margin-bottom: 2rem; } -article h3 a { color: #0066cc; text-decoration: none; } -article h3 a:hover { text-decoration: underline; } -article time { color: #999; font-size: 0.9rem; } -footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #eee; color: #999; font-size: 0.85rem; } -h2 { margin: 1.5rem 0 1rem; } diff --git a/themes/PaperMod b/themes/PaperMod new file mode 160000 index 0000000..3bb0ca2 --- /dev/null +++ b/themes/PaperMod @@ -0,0 +1 @@ +Subproject commit 3bb0ca281fd17eff8e3489011a444f326d7c4c72