feat: OG Image in Chatwoot Help Center (#11826)
_Note: This is only available for Cloud version of Chatwoot._ 
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
<% if !@is_plain_layout_enabled %>
|
||||
<% content_for :head do %>
|
||||
<title><%= @portal.name %></title>
|
||||
<meta name="title" content="<%= @portal.name %>">
|
||||
|
||||
<% if @og_image_url.present? %>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="og:image" content="<%= @og_image_url.html_safe %>">
|
||||
<meta property="og:image" content="<%= @og_image_url.html_safe %>">
|
||||
<meta name="twitter:image" content="<%= @og_image_url.html_safe %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
<section id="portal-bg" class="w-full bg-white dark:bg-slate-900 shadow-inner">
|
||||
<div id="portal-bg-gradient" class="pt-8 pb-8 md:pt-14 md:pb-6 min-h-[240px] md:min-h-[260px]">
|
||||
<div class="mx-auto max-w-5xl px-4 md:px-8 flex flex-col items-start">
|
||||
|
||||
@@ -2,13 +2,23 @@
|
||||
<title><%= @article.title %> | <%= @portal.name %></title>
|
||||
<% if @article.meta["title"].present? %>
|
||||
<meta name="title" content="<%= @article.meta["title"] %>">
|
||||
<meta property="og:title" content="<%= @article.meta["title"] %>">
|
||||
<meta name="twitter:title" content="<%= @article.meta["title"] %>">
|
||||
<% end %>
|
||||
<% if @article.meta["description"].present? %>
|
||||
<meta name="description" content="<%= @article.meta["description"] %>">
|
||||
<meta property="og:description" content="<%= @article.meta["description"] %>">
|
||||
<meta name="twitter:description" content="<%= @article.meta["description"] %>">
|
||||
<% end %>
|
||||
<% if @article.meta["tags"].present? %>
|
||||
<meta name="tags" content="<%= @article.meta["tags"].join(',') %>">
|
||||
<% end %>
|
||||
<% if @og_image_url.present? %>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="og:image" content="<%= @og_image_url.html_safe %>">
|
||||
<meta property="og:image" content="<%= @og_image_url.html_safe %>">
|
||||
<meta name="twitter:image" content="<%= @og_image_url.html_safe %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !@is_plain_layout_enabled %>
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
<% content_for :head do %>
|
||||
<title><%= @category.name %> | <%= @portal.name %></title>
|
||||
<meta name="title" content="<%= @category.name %> | <%= @portal.name %>">
|
||||
<% if @category.description.present? %>
|
||||
<meta name="description" content="<%= @category.description %>">
|
||||
<meta property="og:description" content="<%= @category.description %>">
|
||||
<meta name="twitter:description" content="<%= @category.description %>">
|
||||
<% end %>
|
||||
<% if @og_image_url.present? %>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="og:image" content="<%= @og_image_url.html_safe %>">
|
||||
<meta property="og:image" content="<%= @og_image_url.html_safe %>">
|
||||
<meta name="twitter:image" content="<%= @og_image_url.html_safe %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -35,7 +44,7 @@
|
||||
<span class="text-sm text-slate-600 dark:text-slate-400 font-medium flex items-center"><%= I18n.t('public_portal.common.last_updated_on', last_updated_on: article.updated_at.strftime("%b %d, %Y")) %></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user