Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion www/docs/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# https://support.shareaholic.com/hc/en-us/articles/38798873799956-Social-Media-Content-Preview-Bots-to-Whitelist-in-Robots-txt
# https://developers.facebook.com/docs/sharing/webmasters/web-crawlers/

User-agent: facebookexternalhit
Disallow: /pwdata
Disallow: /pwdata/scrapedxml
Disallow: /pwdata/cmpages
Disallow: /user

User-agent: Twitterbot
Disallow: /pwdata
Disallow: /pwdata/scrapedxml
Disallow: /pwdata/cmpages
Disallow: /user

User-agent: LinkedInBot
Disallow: /pwdata
Disallow: /pwdata/scrapedxml
Disallow: /pwdata/cmpages
Disallow: /user

User-agent: Bluesky
Disallow: /pwdata
Disallow: /pwdata/scrapedxml
Disallow: /pwdata/cmpages
Disallow: /user

# All other crawlers
User-agent: *
Disallow: /pwdata
Disallow: /pwdata/scrapedxml
Expand All @@ -15,4 +43,4 @@ Disallow: /vote
Crawl-delay: 3

User-agent: Baiduspider
Disallow: /
Disallow: /
10 changes: 9 additions & 1 deletion www/includes/easyparliament/templates/html/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<?php } else { ?>
<meta property="og:image" content="https://<?= DOMAIN ?>/images/og/social_<?= $current_assembly ?? 'uk' ?>.png">
<?php
$og_image_assembly_map = [
'uk-commons' => 'uk',
'uk-lords' => 'uk',
'senedd' => 'wales',
];
$og_image_suffix = $og_image_assembly_map[$current_assembly ?? 'uk'] ?? ($current_assembly ?? 'uk');
?>
<meta property="og:image" content="https://<?= DOMAIN ?>/images/og/social_<?= $og_image_suffix ?>.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
Expand Down
Loading