diff --git a/.gitmodules b/.gitmodules
index 9b68069..667dd9d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "themes/gallery"]
path = themes/gallery
url = https://github.com/nicokaiser/hugo-theme-gallery.git
+[submodule "themes/hugo-video"]
+ path = themes/hugo-video
+ url = https://github.com/martignoni/hugo-video.git
diff --git a/Dockerfile b/Dockerfile
index bc5ce58..cb01dc5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,32 @@
FROM hugomods/hugo:exts AS builder
WORKDIR /src
+
COPY archetypes/ archetypes/
-COPY assets/ assets/
-COPY content/ content/
+COPY themes/ themes/
COPY layouts/ layouts/
COPY static/ static/
-COPY themes/ themes/
+COPY assets/ assets/
+COPY content/ content/
COPY hugo.toml .
+
RUN hugo --gc --minify
+FROM alpine:3.20 AS video-posters
+
+RUN apk add --no-cache python3 ffmpeg
+
+WORKDIR /src
+
+COPY --from=builder /src/public /src/public
+COPY scripts/add-video-posters.py /add-video-posters.py
+
+RUN python3 /add-video-posters.py /src/public
+
FROM nginx:alpine
RUN apk add --no-cache openssl
-COPY --from=builder /src/public /usr/share/nginx/html
+COPY --from=video-posters /src/public /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY docker-entrypoint.sh /docker-entrypoint.sh
diff --git a/assets/css/custom.css b/assets/css/custom.css
index 26a191f..d659a54 100644
--- a/assets/css/custom.css
+++ b/assets/css/custom.css
@@ -278,6 +278,30 @@ section.galleries .card img:hover {
opacity: 0.75;
}
+/* ── Videos ────────────────────────────────── */
+
+.prose {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
+ border-top: 1px solid var(--border);
+ margin-left: 0;
+ margin-right: 0;
+ padding: 0;
+ padding-top: 4rem;
+ gap: 0.5rem;
+ max-width: unset !important;
+}
+
+@media only screen and (max-width: 500px) {
+ .prose {
+ grid-template-columns: 1fr;
+ }
+}
+
+.prose video {
+ background: #000;
+}
+
/* ── Gallery back link ────────────────────────────────── */
.gallery-back {
diff --git a/content/standesamt/index.md b/content/standesamt/index.md
index 4f576c2..22b6d1c 100644
--- a/content/standesamt/index.md
+++ b/content/standesamt/index.md
@@ -7,3 +7,7 @@ resources:
params:
cover: true
---
+
+{{< video src="test.mp4" >}}
+
+{{< video src="test2.mp4" >}}
diff --git a/hugo.toml b/hugo.toml
index 5280008..8158363 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -1,6 +1,6 @@
baseURL = "https://plassonke.de/"
title = "Hochzeit"
-theme = "gallery"
+theme = ["hugo-video", "gallery"]
defaultContentLanguage = "de"
disableKinds = ["taxonomy"]
enableRobotsTXT = true
diff --git a/scripts/add-video-posters.py b/scripts/add-video-posters.py
new file mode 100644
index 0000000..9756806
--- /dev/null
+++ b/scripts/add-video-posters.py
@@ -0,0 +1,128 @@
+from __future__ import annotations
+
+import re
+import subprocess
+import sys
+from pathlib import Path
+from urllib.parse import unquote
+
+
+VIDEO_TAG_RE = re.compile(
+ r"",
+ re.IGNORECASE | re.DOTALL,
+ )
+
+SOURCE_RE = re.compile(
+ r']+src=["\'](?P[^"\']+)["\'][^>]*>',
+ re.IGNORECASE,
+)
+
+
+def extract_src(video_attrs: str, video_body: str) -> str | None:
+ """Extract video path from either