search engine optimization IV

dev
gravel 2 years ago
parent a7d385be43
commit 577bbedda1
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -14,11 +14,11 @@
'name' => 'Session Communities List', 'name' => 'Session Communities List',
'@type' => 'WebSite', '@type' => 'WebSite',
'additionalType' => 'Collection', 'additionalType' => 'Collection',
'collectionSize' => count($rooms),
'dateModified' => date('c',filemtime($ROOMS_FILE)), 'dateModified' => date('c',filemtime($ROOMS_FILE)),
'image' => "$SITE_CANONICAL_URL/favicon.svg", 'image' => "$SITE_CANONICAL_URL/favicon.svg",
'isAccessibleForFree' => true, 'isAccessibleForFree' => true,
'maintainer' => array( 'maintainer' => array(
'@type' => 'Person',
'name' => 'gravel', 'name' => 'gravel',
'sameAs' => "https://codeberg.org/gravel", 'sameAs' => "https://codeberg.org/gravel",
), ),
@ -26,7 +26,12 @@
'@type' => 'SearchAction', '@type' => 'SearchAction',
'target' => "$SITE_CANONICAL_URL/#q={search_term_string}", 'target' => "$SITE_CANONICAL_URL/#q={search_term_string}",
'query-input' => 'required name=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( $json_ld_data_rooms = array(
@ -39,8 +44,7 @@
'name' => $room->name, 'name' => $room->name,
'description' => $room->description, 'description' => $room->description,
'url' => $SITE_CANONICAL_URL . $room->get_details_url(), 'url' => $SITE_CANONICAL_URL . $room->get_details_url(),
'image' => $SITE_CANONICAL_URL . '/' . room_icon($room, '64x64'), 'image' => $SITE_CANONICAL_URL . '/' . room_icon($room, '64x64')
'isPartOf' => array('@id' => $SITE_CANONICAL_URL),
); );
return array_filter($values, function ($value) { return array_filter($values, function ($value) {
return $value != null; return $value != null;
@ -53,3 +57,7 @@
<?=json_encode($json_ld_data)?> <?=json_encode($json_ld_data)?>
</script> </script>
<script type="application/ld+json">
<?=json_encode($json_ld_data_rooms)?>
</script>

Loading…
Cancel
Save