summaryrefslogtreecommitdiff
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rw-r--r--config/config.stage.yaml19
-rw-r--r--internal/router/handlers/lang-blog-title.go15
-rw-r--r--views/layouts/general-page.html2
4 files changed, 23 insertions, 15 deletions
diff --git a/Dockerfile b/Dockerfile
index 79b5973..44d1ea2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -20,7 +20,7 @@ COPY --from=build-stage /builddir/migrations /app/migrations
COPY --from=build-stage /builddir/static /app/static
COPY --from=build-stage /builddir/views /app/views
COPY --from=build-stage /builddir/l10n/*.yaml /app/l10n/
-COPY --from=build-stage /builddir/config/config.${ENVIRONMENT}.yaml /app/config/config.${ENVIRONMENT}.yaml
+COPY --from=build-stage /builddir/config/config.*.yaml /app/config/
RUN apk add --no-cache tzdata sqlite
diff --git a/config/config.stage.yaml b/config/config.stage.yaml
index f593fef..30feead 100644
--- a/config/config.stage.yaml
+++ b/config/config.stage.yaml
@@ -31,11 +31,11 @@ localePath: ./locale/
availableLanguages:
- name: ru
alt: Русский
- flag: https://storage.yandexcloud.kz/sayauz-static/flags/ru.svg
+ flag: https://cdn.saya.uz/static/flags/ru.svg
locFile: localization.ru.yaml
- name: en
alt: English
- flag: https://storage.yandexcloud.kz/sayauz-static/flags/gb.svg
+ flag: https://cdn.saya.uz/static/flags/gb.svg
locFile: localization.en.yaml
auth:
db:
@@ -56,19 +56,19 @@ mail:
canonicalEndpoint: "https://${FQDN}"
photoStorage:
full:
- baseUrl: https://storage.yandexcloud.kz/sayauz-photos/%s
+ baseUrl: https://photos.saya.uz/jpeg-full/%s
webp:
- baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp/%s.webp
+ baseUrl: https://photos.saya.uz/webp-full/%s.webp
thumbnail1600p:
- baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp1600/%s.webp
+ baseUrl: https://photos.saya.uz/webp-1600p/%s.webp
thumbnail1200p:
- baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp1200/%s.webp
+ baseUrl: https://photos.saya.uz/webp-1200p/%s.webp
thumbnail800p:
- baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp800/%s.webp
+ baseUrl: https://photos.saya.uz/webp-800p/%s.webp
thumbnail560p:
- baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp560/%s.webp
+ baseUrl: https://photos.saya.uz/webp-560p/%s.webp
thumbnail320p:
- baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp320/%s.webp
+ baseUrl: https://photos.saya.uz/webp-320p/%s.webp
homePageGifs:
baseUrl: https://cdn.saya.uz/static/home-page-gifs/otter-%s.gif
indexes: ["1", "2", "3"]
@@ -78,5 +78,4 @@ staticStorage:
baseUrl: https://cdn.saya.uz/map
pmTiles: global.pmtiles
allowOrigins:
- - https://storage.yandexcloud.kz
- https://cdn.saya.uz
diff --git a/internal/router/handlers/lang-blog-title.go b/internal/router/handlers/lang-blog-title.go
index eac317a..5a1155d 100644
--- a/internal/router/handlers/lang-blog-title.go
+++ b/internal/router/handlers/lang-blog-title.go
@@ -10,6 +10,7 @@ import (
"github.com/SayaAndy/saya-today-web/internal/blog"
"github.com/SayaAndy/saya-today-web/internal/frontmatter"
"github.com/SayaAndy/saya-today-web/internal/router"
+ "github.com/SayaAndy/saya-today-web/l10n"
"github.com/gofiber/fiber/v2"
"github.com/yuin/goldmark"
)
@@ -70,11 +71,15 @@ func (r *BlogPageHandler) AddMeta(c *fiber.Ctx, supplements *router.Supplements,
if err != nil {
return nil, fmt.Errorf("failed to read frontmatter of the desired blog post: %w", err)
}
+ title := metadata.Title
+ if metadata.Medley != "" {
+ title += " // " + l10n.T.GetPath(lang, "Medleys", metadata.Medley).(string)
+ }
return []router.MetaField{
- {Property: "og:title", Content: metadata.Title},
+ {Property: "og:title", Content: title},
{Property: "og:description", Content: fmt.Sprintf("%s [%s]", metadata.ShortDescription, metadata.ActionDate)},
- {Property: "og:image", Content: fmt.Sprintf(supplements.PhotoStorage.Thumbnail320p.BaseUrl, metadata.Thumbnail)},
+ {Property: "og:image", Content: fmt.Sprintf(supplements.PhotoStorage.Thumbnail560p.BaseUrl, metadata.Thumbnail)},
{Property: "og:url", Content: fmt.Sprintf("%s/%s/blog/%s", templateMap["CanonicalEndpoint"], lang, c.Params("title"))},
{Property: "og:type", Content: "website"},
{Name: "twitter:card", Content: "summary_large_image"},
@@ -86,11 +91,15 @@ func (r *BlogPageHandler) AddLinkedData(c *fiber.Ctx, supplements *router.Supple
if err != nil {
return nil, fmt.Errorf("failed to read frontmatter of the desired blog post: %w", err)
}
+ title := metadata.Title
+ if metadata.Medley != "" {
+ title += " // " + l10n.T.GetPath(lang, "Medleys", metadata.Medley).(string)
+ }
return map[string]any{
"@context": "https://schema.org",
"@type": "Article",
- "headline": metadata.Title,
+ "headline": title,
"description": fmt.Sprintf("%s [%s]", metadata.ShortDescription, metadata.ActionDate),
"author": map[string]string{"@type": "Person", "name": "Saya Andy"},
"datePublished": metadata.PublishedTime.UTC().Format(time.RFC3339),
diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html
index 908a78c..9220b7f 100644
--- a/views/layouts/general-page.html
+++ b/views/layouts/general-page.html
@@ -14,7 +14,7 @@
{{end}}
/>
{{- if eq .Property "og:title" }}
- <title>{{.Content}} // SAYA.UZ</title>
+ <title>{{.Content}}</title>
{{- end }} {{- if eq .Property "og:description" }}
<meta name="description" content="{{.Content}}" />
{{- end }} {{- if eq .Property "og:url" }}