Set og:image:alt OpenGraph property

This commit is contained in:
Anton Khorev 2024-08-02 18:48:04 +03:00
parent 69a2d5f4d4
commit 243557a31a
4 changed files with 47 additions and 7 deletions

View file

@ -69,6 +69,7 @@ class DiaryEntriesController < ApplicationController
if @entry
@title = t ".title", :user => params[:display_name], :title => @entry.title
@og_image = @entry.body.image
@og_image_alt = @entry.body.image_alt
@comments = can?(:unhide, DiaryComment) ? @entry.comments : @entry.visible_comments
else
@title = t "diary_entries.no_such_entry.title", :id => params[:id]