summaryrefslogtreecommitdiff
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rw-r--r--internal/lightgallery/parser.go3
2 files changed, 5 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index e3d9e65..45d3e8e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,4 +16,6 @@ COPY --from=build-stage /builddir/views /app/views
COPY --from=build-stage /builddir/locale/*.yaml /app/locale/
COPY --from=build-stage /builddir/config/config.yaml /app/config.yaml
+RUN apk add --no-cache tzdata
+
ENTRYPOINT [ "/app/sayana-demo", "-c", "/app/config.yaml" ]
diff --git a/internal/lightgallery/parser.go b/internal/lightgallery/parser.go
index 2c10c01..bd7483a 100644
--- a/internal/lightgallery/parser.go
+++ b/internal/lightgallery/parser.go
@@ -2,6 +2,7 @@ package lightgallery
import (
"bytes"
+ "log/slog"
"regexp"
"strings"
"time"
@@ -33,11 +34,13 @@ func (p *LightGalleryParser) Open(parent ast.Node, reader text.Reader, pc parser
trimmed := bytes.TrimSpace(line)
parts := r.FindSubmatch(trimmed)
if len(parts) < 2 {
+ slog.Warn("invalid gallery header format", slog.String("line", string(trimmed)), slog.Int("submatch_count", len(parts)))
return nil, parser.NoChildren
}
loc, err := time.LoadLocation(string(parts[1]))
if err != nil {
+ slog.Warn("invalid location specified for a gallery", slog.String("error", err.Error()), slog.String("line", string(trimmed)), slog.String("location", string(parts[1])))
return nil, parser.NoChildren
}