'https://schema.org/',
'@id' => $SITE_CANONICAL_URL,
'url' => $SITE_CANONICAL_URL,
'description' => 'Up-to-date list of public groups in Session Messenger.',
'name' => 'Session Communities List',
'@type' => 'WebSite',
'additionalType' => 'Collection',
'dateModified' => date('c',filemtime($ROOMS_FILE)),
'image' => "$SITE_CANONICAL_URL/favicon.svg",
'isAccessibleForFree' => true,
'maintainer' => array(
'@type' => 'Person',
'name' => 'gravel',
'sameAs' => "https://codeberg.org/gravel",
),
'potentialAction' => array(
'@type' => 'SearchAction',
'target' => "$SITE_CANONICAL_URL/#q={search_term_string}",
'query-input' => 'required name=search_term_string'
),
'mentions' => array_map(function (CommunityRoom $room) {
return array(
'@id' => $room->get_join_url()
);
}, $rooms),
);
$json_ld_data_rooms = array(
'@context' => 'https://schema.org/',
'@graph' => array_map(function(CommunityRoom $room) {
$values = array(
'@type' => 'EntryPoint',
'@id' => $room->get_join_url(),
'additionalType' => 'VirtualLocation',
'name' => $room->name,
'description' => $room->description,
'url' => $SITE_CANONICAL_URL . $room->get_details_url(),
'image' => $SITE_CANONICAL_URL . '/' . room_icon($room, '64x64')
);
return array_filter($values, function ($value) {
return $value != null;
});
}, $rooms),
)
?>