summaryrefslogtreecommitdiff
path: root/internal/router/handlers/lang-user.go
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'internal/router/handlers/lang-user.go')
-rw-r--r--internal/router/handlers/lang-user.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/router/handlers/lang-user.go b/internal/router/handlers/lang-user.go
index c22bcac..0dda529 100644
--- a/internal/router/handlers/lang-user.go
+++ b/internal/router/handlers/lang-user.go
@@ -37,10 +37,13 @@ func (r *UserHandler) ToValidateLang() router.LangSetting {
return router.InPath
}
-func (r *UserHandler) AddMeta(c *fiber.Ctx, supplements *router.Supplements, lang string, templateMap fiber.Map) (meta map[string]string, err error) {
- return map[string]string{
- "og:title": supplements.Localization[lang].BlogSearch.Header,
- "og:description": supplements.Localization[lang].BlogSearch.Description,
+func (r *UserHandler) AddMeta(c *fiber.Ctx, supplements *router.Supplements, lang string, templateMap fiber.Map) (meta []router.MetaField, err error) {
+ return []router.MetaField{
+ {Name: "robots", Content: "noindex,nofollow"},
+ {Property: "og:title", Content: supplements.Localization[lang].UserProfile.Header},
+ {Property: "og:description", Content: supplements.Localization[lang].UserProfile.Description},
+ {Property: "og:url", Content: fmt.Sprintf("%s/%s/user", templateMap["CanonicalEndpoint"], lang)},
+ {Property: "og:type", Content: "website"},
}, nil
}
@@ -52,7 +55,7 @@ func (r *UserHandler) RenderBody(c *fiber.Ctx, supplements *router.Supplements,
slog.Error("get info from mailer about a client", slog.String("error", err.Error()))
}
- tagsArray, err := getTags(supplements.B2Client, lang)
+ tagsArray, err := getTags(supplements.BlogClient, lang)
if err != nil {
return fiber.ErrInternalServerError.Code, fmt.Errorf("failed to get the available tags")
}