Remove "User's Diary" from diary entry og:title

This commit is contained in:
Anton Khorev 2024-10-20 19:10:36 +03:00
parent 6d0c291332
commit eaabf7bb59
3 changed files with 13 additions and 1 deletions

View file

@ -71,6 +71,7 @@ class DiaryEntriesController < ApplicationController
if @entry
@title = t ".title", :user => params[:display_name], :title => @entry.title
@opengraph_properties = {
"og:title" => @entry.title,
"og:image" => @entry.body.image,
"og:image:alt" => @entry.body.image_alt,
"og:description" => @entry.body.description,

View file

@ -4,7 +4,7 @@ module OpenGraphHelper
def opengraph_tags(title, properties)
tags = {
"og:site_name" => t("layouts.project_name.title"),
"og:title" => title || t("layouts.project_name.title"),
"og:title" => properties["og:title"] || title || t("layouts.project_name.title"),
"og:type" => "website",
"og:url" => url_for(:only_path => false),
"og:description" => properties["og:description"] || t("layouts.intro_text")