Skip to content
Snippets Groups Projects
Commit 795233f9 authored by Síle Ekaterin Liszka's avatar Síle Ekaterin Liszka
Browse files

Chessa::URI::Default::ld_json: LD author field is an object for singletons on some sites

parent 7491e346
No related branches found
No related tags found
No related merge requests found
......@@ -219,8 +219,12 @@ sub ld_json($self, $t, $authority) {
$title =~ s/^\s+//; $title =~ s/\s+$//;
my $published = $json->{datePublished};
my @authors = ();
foreach my $author (@{ $json->{author}}) {
push @authors, $author->{name};
if (ref($json->{author}) eq 'HASH') {
push @authors, $json->{author}{name};
} else {
foreach my $author (@{ $json->{author}}) {
push @authors, $author->{name};
}
}
my $author = join ', ', @authors;
return $self->{msg}($authority, $json->{headline}) . ' ' .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment