diff --git a/lib/OwlcodeTech/Categories.pm b/lib/OwlcodeTech/Categories.pm index 9642fcc..4dadc7a 100644 --- a/lib/OwlcodeTech/Categories.pm +++ b/lib/OwlcodeTech/Categories.pm @@ -11,6 +11,7 @@ use Const::Fast; use Mojo::DOM; use Path::Tiny; +use OwlcodeTech; use OwlcodeTech::Preview; const my $CURRENT_FILE => __FILE__; @@ -158,8 +159,9 @@ sub _AvoidGrandChildCategories ( $self, $categories ) { sub PreviewOg ( $self, $category ) { my $title = $category->{title}; my $description = $category->{description}; - my $site_name = $self->config('site_name'); - return OwlcodeTech::Preview->Generate( $title, $description, undef, + my $image = $category->{image}; + my $site_name = OwlcodeTech->new->config('site_name'); + return OwlcodeTech::Preview->Generate( $title, $description, $image, $site_name ); } 1; diff --git a/lib/OwlcodeTech/Preview.pm b/lib/OwlcodeTech/Preview.pm index 0452089..4991f63 100644 --- a/lib/OwlcodeTech/Preview.pm +++ b/lib/OwlcodeTech/Preview.pm @@ -17,7 +17,7 @@ use MIME::Base64; const my $CURRENT_FILE => __FILE__; const my $ROOT_PROJECT => path($CURRENT_FILE)->parent->parent->parent; const my $PUBLIC_DIR => $ROOT_PROJECT->child('public'); -const my $BURGUILLOS_LOGO => $PUBLIC_DIR->child('img/burguillos.webp'); +const my $OWLCODE_LOGO => $PUBLIC_DIR->child('img/owlcode_tech.webp'); const my $SVG_WIDTH => 1200; const my $SVG_HEIGHT => 627; const my $SVG_EMBEDDED_IMAGE_MAX_WIDTH => 1000; @@ -26,6 +26,7 @@ const my $SVG_EMBEDDED_IMAGE_MAX_HEIGHT => 200; sub Generate ( $self, $title, $content, $image_file, $site_name ) { my $dom = Mojo::DOM->new($content); $content = $dom->all_text; + $title = Mojo::DOM->new('