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}) {