Compare commits
3 Commits
d16c29fc5d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| cbdd378c4b | |||
| c9fa92923e | |||
| 3ec52dfc71 |
@@ -0,0 +1,4 @@
|
||||
#title: ""
|
||||
#attribution: ""
|
||||
description: "L'alias `comportement_suspect` se remplit tout seul désormais."
|
||||
#prompt: ""
|
||||
@@ -0,0 +1,4 @@
|
||||
#title: ""
|
||||
#attribution: ""
|
||||
description: "Vue simplifiée de mon architecture réseau."
|
||||
#prompt: ""
|
||||
@@ -0,0 +1,4 @@
|
||||
#title: ""
|
||||
attribution: "ChatGPT Auto"
|
||||
description: "Collaboration entre Caddy et OPNsense pour filtrer les comportements suspects sur mon site."
|
||||
prompt: "Dynamic digital illustration showing collaboration between a Caddy web server and an OPNsense firewall to block suspicious IP addresses while remaining bot-friendly. Split cyber-security themed scene: on the left a modern server rack with the Caddy logo and a glowing blue protective shield, friendly small robot bots representing legitimate crawlers; on the right an OPNsense firewall server emitting an orange security shield. In the center a digital warning panel reading ‘Access Denied – Suspicious IP’ with network traffic being filtered. Dark cyber-security environment with world map, network lines, glowing circuits, blue vs orange lighting contrast, cinematic lighting, high-detail, wide banner illustration suitable as a blog header."
|
||||
@@ -0,0 +1,4 @@
|
||||
#title: ""
|
||||
#attribution: ""
|
||||
description: "Ce petit malotru vérifie si je fais tourner WordPress. Pour la dernière fois."
|
||||
#prompt: ""
|
||||
@@ -0,0 +1,15 @@
|
||||
flowchart LR
|
||||
internet[Internet]
|
||||
freebox[Freebox<br/>mode bridge]
|
||||
opnsense[Routeur<br/>OPNsense + Caddy]
|
||||
|
||||
internet --> freebox --> opnsense
|
||||
|
||||
subgraph lan[Réseau local]
|
||||
direction TB
|
||||
server[server-main<br/>NixOS + Caddy<br/>Héberge mon blog]
|
||||
others[Autres machines physiques<br/>Autres services web]
|
||||
end
|
||||
|
||||
opnsense -->|Reverse-proxy| server
|
||||
opnsense -->|Reverse-proxy| others
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 371 KiB |
File diff suppressed because it is too large
Load Diff
6
test.sh
6
test.sh
@@ -18,4 +18,8 @@ detect_dev_host() {
|
||||
DEV_HOST="$(detect_dev_host)"
|
||||
DEV_PORT=1313
|
||||
|
||||
hugo server -DEF --bind "$DEV_HOST" --port $DEV_PORT --baseURL "http://$DEV_HOST:$DEV_PORT"
|
||||
if [ -z "${MEILI_SEARCH_API_KEY+x}" ]; then
|
||||
export MEILI_SEARCH_API_KEY="dummy"
|
||||
fi
|
||||
|
||||
hugo server -DEF --bind "$DEV_HOST" --port $DEV_PORT --baseURL "http://$DEV_HOST:$DEV_PORT"
|
||||
|
||||
@@ -76,7 +76,11 @@
|
||||
{{- if gt $coverDisplay.Width 1480 -}}
|
||||
{{- $coverWidth = 1480 -}}
|
||||
{{- end -}}
|
||||
{{- $coverDisplay = $coverImage.Resize (printf "%dx webp q80" $coverWidth) -}}
|
||||
{{- $coverDisplay = partial "media/process-image.html" (dict
|
||||
"image" $coverImage
|
||||
"action" "Resize"
|
||||
"spec" (printf "%dx" $coverWidth)
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -100,7 +100,11 @@
|
||||
{{- $title := default (printf "Image complémentaire : %s" $imageName) (index $data "title") -}}
|
||||
{{- $thumbnail := . -}}
|
||||
{{- if and (ne .MediaType.SubType "svg") (gt .Width 360) -}}
|
||||
{{- $thumbnail = .Resize "360x webp q80" -}}
|
||||
{{- $thumbnail = partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Resize"
|
||||
"spec" "360x"
|
||||
) -}}
|
||||
{{- end -}}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}" title="{{ $title }}">
|
||||
|
||||
@@ -41,8 +41,6 @@
|
||||
{{- $thumbnailTransform = "900x506" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $thumbnailOptions := printf "%s webp q80" $thumbnailTransform -}}
|
||||
|
||||
{{- $coverPath := $page.Params.cover -}}
|
||||
{{- $image := false -}}
|
||||
{{- if $coverPath -}}
|
||||
@@ -111,7 +109,11 @@
|
||||
<a href="{{ $page.RelPermalink }}">
|
||||
<figure>
|
||||
{{- with $image -}}
|
||||
{{- $resized := .Fill $thumbnailOptions -}}
|
||||
{{- $resized := partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Fill"
|
||||
"spec" $thumbnailTransform
|
||||
) -}}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="Image de couverture pour {{ $page.Title }}" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
@@ -127,7 +129,11 @@
|
||||
<a href="{{ $page.RelPermalink }}">
|
||||
<figure>
|
||||
{{- with $image -}}
|
||||
{{- $resized := .Fill $thumbnailOptions -}}
|
||||
{{- $resized := partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Fill"
|
||||
"spec" $thumbnailTransform
|
||||
) -}}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="Image de couverture pour {{ $page.Title }}" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
||||
@@ -15,13 +15,21 @@
|
||||
{{- if gt $image.Width $maxWidth -}}
|
||||
{{- $targetWidth = $maxWidth -}}
|
||||
{{- end -}}
|
||||
{{- $display = $image.Resize (printf "%dx webp q80" $targetWidth) -}}
|
||||
{{- $display = partial "media/process-image.html" (dict
|
||||
"image" $image
|
||||
"action" "Resize"
|
||||
"spec" (printf "%dx" $targetWidth)
|
||||
) -}}
|
||||
{{- else -}}
|
||||
{{- $targetHeight := $image.Height -}}
|
||||
{{- if gt $image.Height 900 -}}
|
||||
{{- $targetHeight = 900 -}}
|
||||
{{- end -}}
|
||||
{{- $display = $image.Resize (printf "x%d webp q80" $targetHeight) -}}
|
||||
{{- $display = partial "media/process-image.html" (dict
|
||||
"image" $image
|
||||
"action" "Resize"
|
||||
"spec" (printf "x%d" $targetHeight)
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
30
themes/2026/layouts/_partials/media/process-image.html
Normal file
30
themes/2026/layouts/_partials/media/process-image.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{{/* Préserve les GIF animés en évitant toute transformation Hugo. */}}
|
||||
{{- $image := .image -}}
|
||||
{{- if not $image -}}
|
||||
{{- errorf "media/process-image.html: missing image resource" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $action := .action -}}
|
||||
{{- if not $action -}}
|
||||
{{- errorf "media/process-image.html: missing image action for %q" $image.Name -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $spec := .spec -}}
|
||||
{{- if not $spec -}}
|
||||
{{- errorf "media/process-image.html: missing image spec for %q" $image.Name -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $result := $image -}}
|
||||
{{- $subType := lower $image.MediaType.SubType -}}
|
||||
{{- if and (ne $subType "svg") (ne $subType "gif") -}}
|
||||
{{- $options := printf "%s webp q80" $spec -}}
|
||||
{{- if eq $action "Fill" -}}
|
||||
{{- $result = $image.Fill $options -}}
|
||||
{{- else if eq $action "Resize" -}}
|
||||
{{- $result = $image.Resize $options -}}
|
||||
{{- else -}}
|
||||
{{- errorf "media/process-image.html: unsupported image action %q for %q" $action $image.Name -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $result -}}
|
||||
@@ -4,7 +4,11 @@
|
||||
{{- $assetPath := "images/oeuvres/l-anankeisme.png" -}}
|
||||
{{- $source := resources.Get $assetPath -}}
|
||||
{{- if $source -}}
|
||||
{{- $img := $source.Resize "320x webp q80" -}}
|
||||
{{- $img := partial "media/process-image.html" (dict
|
||||
"image" $source
|
||||
"action" "Resize"
|
||||
"spec" "320x"
|
||||
) -}}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" alt="Couverture de L'Anankéisme" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
{{- $assetPath := "images/oeuvres/l-humain-cette-espece-primitive.jpeg" -}}
|
||||
{{- $source := resources.Get $assetPath -}}
|
||||
{{- if $source -}}
|
||||
{{- $img := $source.Resize "320x webp q80" -}}
|
||||
{{- $img := partial "media/process-image.html" (dict
|
||||
"image" $source
|
||||
"action" "Resize"
|
||||
"spec" "320x"
|
||||
) -}}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" alt="Couverture de L'Humain, cette espèce primitive" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
{{- $logo := resources.GetMatch $logoPath -}}
|
||||
<a href="{{ "/" | relURL }}" aria-label="Revenir à l'accueil">
|
||||
{{- with $logo -}}
|
||||
{{- $resized := .Resize "64x webp q80" -}}
|
||||
{{- $resized := partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Resize"
|
||||
"spec" "64x"
|
||||
) -}}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="">
|
||||
{{- end -}}
|
||||
<strong>{{ $site.Title }}</strong>
|
||||
|
||||
@@ -36,7 +36,11 @@
|
||||
{{- with $image -}}
|
||||
<a href="{{ $page.RelPermalink }}">
|
||||
<figure>
|
||||
{{- $resized := .Fill "600x340 webp q80" -}}
|
||||
{{- $resized := partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Fill"
|
||||
"spec" "600x340"
|
||||
) -}}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="Image de couverture pour {{ $page.Title }}" loading="lazy">
|
||||
</figure>
|
||||
</a>
|
||||
|
||||
@@ -315,7 +315,11 @@
|
||||
<a href="{{ $page.RelPermalink }}">
|
||||
<figure>
|
||||
{{- with $image -}}
|
||||
{{- $resized := .Fill "166x91 webp q80" -}}
|
||||
{{- $resized := partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Fill"
|
||||
"spec" "166x91"
|
||||
) -}}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="Capture du lien {{ $page.Title }}" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
@@ -401,7 +405,11 @@
|
||||
<a href="{{ $item.RelPermalink }}" title="{{ $item.Title }}">
|
||||
<figure>
|
||||
{{- with $itemImage -}}
|
||||
{{- $resized := .Resize "x128 webp q80" -}}
|
||||
{{- $resized := partial "media/process-image.html" (dict
|
||||
"image" .
|
||||
"action" "Resize"
|
||||
"spec" "x128"
|
||||
) -}}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="{{ $item.Title }}" title="{{ $item.Title }}" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
||||
Reference in New Issue
Block a user