From d1612ae685920aed92e78eb3239e3d342fd8e486 Mon Sep 17 00:00:00 2001 From: swag Date: Sun, 4 Jun 2023 17:47:36 -0400 Subject: [PATCH] Moar Open Graph tags --- templates/page/about.html.ep | 10 ++++++++++ templates/page/rules.html.ep | 10 ++++++++++ templates/remark/by_id.html.ep | 7 +++++++ templates/remark/create.html.ep | 8 +++++++- templates/thread/by_id.html.ep | 2 +- templates/thread/create.html.ep | 5 +++++ 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/templates/page/about.html.ep b/templates/page/about.html.ep index e3fed38..e7ba766 100644 --- a/templates/page/about.html.ep +++ b/templates/page/about.html.ep @@ -1,5 +1,15 @@ % layout 'default'; % title 'About Post::Text'; +% content_for open_graph => begin + + + +% end

<%= title %>

Post::Text is a diff --git a/templates/page/rules.html.ep b/templates/page/rules.html.ep index 9c59ccd..11b24f7 100644 --- a/templates/page/rules.html.ep +++ b/templates/page/rules.html.ep @@ -1,5 +1,15 @@ % layout 'default'; % title 'The Rules™'; +% content_for open_graph => begin + + + +% end

<%= title %>

The rules here are pretty simple:

diff --git a/templates/remark/by_id.html.ep b/templates/remark/by_id.html.ep index a213941..a828d20 100644 --- a/templates/remark/by_id.html.ep +++ b/templates/remark/by_id.html.ep @@ -2,6 +2,13 @@ % title my $remark_id = $remark->{'id'} ? "Remark #$remark_id" : '?';

<%= title %>

<% if (keys %{$remark}) { =%> +<% content_for open_graph => begin %> + + + +<% end %>

diff --git a/templates/remark/create.html.ep b/templates/remark/create.html.ep index 7bdf527..9908a8a 100644 --- a/templates/remark/create.html.ep +++ b/templates/remark/create.html.ep @@ -1,7 +1,13 @@ % layout 'default'; -% title 'New Remark'; +% title my $thread_id = $thread->{'id'} ? "Remark on Thread #$thread_id" : '?';

<%= title %>

<% if (keys %{$thread}) { =%> +<% content_for open_graph => begin %> + + + +<% end %>
<% if (my $error = validation->error('author')) { =%> diff --git a/templates/thread/by_id.html.ep b/templates/thread/by_id.html.ep index c332516..1e34140 100644 --- a/templates/thread/by_id.html.ep +++ b/templates/thread/by_id.html.ep @@ -4,7 +4,7 @@ <% if (keys %{$thread}) { =%> <% content_for open_graph => begin %> - + <% end %> diff --git a/templates/thread/create.html.ep b/templates/thread/create.html.ep index 89bd371..863bafb 100644 --- a/templates/thread/create.html.ep +++ b/templates/thread/create.html.ep @@ -1,5 +1,10 @@ % layout 'default'; % title 'New Thread'; +% content_for open_graph => begin + + + +% end

<%= title %>