From 43f7130901fc42d750af871e0446a0cfc85aea16 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Wed, 17 May 2023 05:00:15 +0200 Subject: [PATCH] Adding preview to be shown. --- templates/layouts/default.html.ep | 2 +- templates/page/index.html.ep | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index df26f87..2ebb48d 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -19,7 +19,7 @@ <%= $title_meta %> - + % my $ogimage = stash 'ogimage'; % my $user_agent = stash 'useragent'; diff --git a/templates/page/index.html.ep b/templates/page/index.html.ep index 60bd23f..d886ced 100644 --- a/templates/page/index.html.ep +++ b/templates/page/index.html.ep @@ -8,8 +8,9 @@ % use OwlcodeTech::Posts; % % my $description_og = '
'.$current_category->{description}.'
'; +% my $base_url = config 'base_url'; % $description_og = Mojo::DOM->new($description_og)->all_text; -% layout 'default', current_category => $current_category, description_og => $description_og; +% layout 'default', current_category => $current_category, description_og => $description_og, ogimage => "$base_url/@{[$current_category->{slug}]}-preview.png"; % title $current_category->{title};
% if (defined $current_category->{image}) {