Added Open Graph tags for by_id

This commit is contained in:
swag 2023-06-04 16:36:13 -04:00
parent 0673d2688c
commit 277afd71fc
3 changed files with 8 additions and 2 deletions

View File

@ -11,6 +11,8 @@
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="theme-color" content="#5b90a4">
<%= content 'open_graph' =%>
<meta property="og:url" content="<%= url_for->to_abs %>">
<meta property="og:site_name" content="Post::Text">
<%= asset 'app.css' %>
</head>
<body>

View File

@ -2,6 +2,12 @@
% title my $thread_id = $thread->{'id'} ? "Thread #$thread_id" : '?';
<h2 class="page-title"><%= title %></h2>
<% if (keys %{$thread}) { =%>
<% content_for open_graph => begin %>
<meta property="og:type" content="article">
<meta property="og:title" content="<%= title %>: <%= $thread->{'title'} %>">
<meta property="og:description"
content="<%= truncate_text $thread->{'body'} %>">
<% end %>
<main class="pager">
<article class="post">
<h3 class="post__title">

View File

@ -2,8 +2,6 @@
% title 'Threads List';
% content_for open_graph => begin
<meta property="og:type" content="website">
<meta property="og:url" content="<%= url_for->to_abs %>">
<meta property="og:site_name" content="Post::Text">
<meta property="og:title" content="<%= title %>">
<meta property="og:description" content="In UTF-8 we trust. 🫡">
% end