From a9e050c2e4e5682dfeba23e9053f5d022bc527a7 Mon Sep 17 00:00:00 2001 From: richarddushime Date: Wed, 22 Jul 2026 19:04:24 +0200 Subject: [PATCH 1/2] Add distinct social sharing preview images for Impact, AWoP, Teaching Open Science, and Contributor Analyses Wires up sharing_image_resource for existing unused images already sitting in each page's content bundle, instead of falling back to the generic FORRT banner for social media link previews. Co-Authored-By: Claude Sonnet 5 --- content/awop/index.md | 2 ++ content/contributor-analysis/index.md | 2 ++ content/impact/index.md | 2 ++ content/teaching_os/index.md | 2 ++ 4 files changed, 8 insertions(+) diff --git a/content/awop/index.md b/content/awop/index.md index bf939285f5e..a06734106a0 100644 --- a/content/awop/index.md +++ b/content/awop/index.md @@ -4,4 +4,6 @@ type = "widget_page" headless = false # Homepage is headless, other widget pages are not. title = "Academic Wheel of Privilege (AWoP)" # url = "/awop" +sharing_image_resource = "AWOP.webp" +sharing_image_alt = "The Academic Wheel of Privilege — a tool for authorship order decisions" +++ diff --git a/content/contributor-analysis/index.md b/content/contributor-analysis/index.md index 9dd7b07b531..0dc6090a144 100644 --- a/content/contributor-analysis/index.md +++ b/content/contributor-analysis/index.md @@ -7,6 +7,8 @@ output: preserve_yaml: true toc: false type: contributors_analysis +sharing_image_resource: "treemap-plot-1.png" +sharing_image_alt: "Treemap showing the share of FORRT contributors by number of projects they contributed to" --- As of 10 June 2026, FORRT has a total of 109 completed or ongoing diff --git a/content/impact/index.md b/content/impact/index.md index 402081e5a82..a1c0c5c5787 100644 --- a/content/impact/index.md +++ b/content/impact/index.md @@ -3,5 +3,7 @@ type = "widget_page" headless = false # Homepage is headless, other widget pages are not. title = "Impact" +sharing_image_resource = "impacts-map.webp" +sharing_image_alt = "World map showing the number of FORRT contributors and collaborators by country" +++ diff --git a/content/teaching_os/index.md b/content/teaching_os/index.md index a97b79b7209..946f198f559 100644 --- a/content/teaching_os/index.md +++ b/content/teaching_os/index.md @@ -4,6 +4,8 @@ type = "widget_page" headless = false # Homepage is headless, other widget pages are not. title="Teaching Open Science" # url = "/feedback" +sharing_image_resource = "PostEdu1.webp" +sharing_image_alt = "POST-Edu: Promoting Open Science Teaching, a positive, inclusive and participatory program for educators" +++ **** From 970f0123f0bfebf47c206884827a1ea87657493a Mon Sep 17 00:00:00 2001 From: richarddushime Date: Wed, 22 Jul 2026 20:38:00 +0200 Subject: [PATCH 2/2] extra 4 and use of static images --- content/adopting/index.md | 2 ++ content/citation-politics/_index.md | 2 ++ content/citation-politics/toolkit/index.md | 2 ++ content/just_os_chatbot/index.md | 2 ++ content/nowherelab/_index.md | 2 ++ layouts/partials/site_head.html | 8 ++++++++ 6 files changed, 18 insertions(+) diff --git a/content/adopting/index.md b/content/adopting/index.md index 8986350db7c..5baafc87597 100644 --- a/content/adopting/index.md +++ b/content/adopting/index.md @@ -3,4 +3,6 @@ type = "widget_page" headless = false # Homepage is headless, other widget pages are not. title = "Adopting Open Science" +sharing_image = "img/ape.webp" +sharing_image_alt = "Adopting Principled Education — commitments to integrate, teach, share, and address open science practices" +++ diff --git a/content/citation-politics/_index.md b/content/citation-politics/_index.md index 4ca5e63336b..a74d00ed78b 100644 --- a/content/citation-politics/_index.md +++ b/content/citation-politics/_index.md @@ -2,6 +2,8 @@ summary: "Citations can be thought of as a currency in the academy, where more citations equals more prestige. While the system assumes a meritocracy—where higher citation counts supposedly indicate higher quality because a work is deemed valuable and legitimate by peers—this perspective ignores inherent biases and systemic inequalities." type: citation_politics url: "/citation-politics/" +sharing_image: "img/citation-politics-toolkit.webp" +sharing_image_alt: "Towards Citational Justice Across the Whole Research Cycle — a wheel of citation politics tools and practices for planning, project, paper, and publication stages" ---
diff --git a/content/citation-politics/toolkit/index.md b/content/citation-politics/toolkit/index.md index 78b83766e2f..837f01f4ed8 100644 --- a/content/citation-politics/toolkit/index.md +++ b/content/citation-politics/toolkit/index.md @@ -1,6 +1,8 @@ --- type: citation_politics url: "/citation-politics/toolkit/" +sharing_image: "img/citation-politics-toolkit.webp" +sharing_image_alt: "Towards Citational Justice Across the Whole Research Cycle — a wheel of citation politics tools and practices for planning, project, paper, and publication stages" --- {{< citation-politics-toolkit >}} diff --git a/content/just_os_chatbot/index.md b/content/just_os_chatbot/index.md index 2305d56f0b1..fcd26dd251f 100644 --- a/content/just_os_chatbot/index.md +++ b/content/just_os_chatbot/index.md @@ -3,4 +3,6 @@ type = "widget_page" headless = false # Homepage is headless, other widget pages are not. title = "JUST-OS Chatbot" +sharing_image = "img/just_os_icon.webp" +sharing_image_alt = "JUST-OS chatbot mascot logo" +++ diff --git a/content/nowherelab/_index.md b/content/nowherelab/_index.md index 07904a0082c..d031c0b2ee8 100644 --- a/content/nowherelab/_index.md +++ b/content/nowherelab/_index.md @@ -2,6 +2,8 @@ title: Nowhere Lab subtitle: An online lab community for those without a lab date: 2026-04-28 +sharing_image: "img/nowherelab-logo.png" +sharing_image_alt: "Nowhere Lab logo" ---
diff --git a/layouts/partials/site_head.html b/layouts/partials/site_head.html index 3c8ae3e08c4..b50d6c38f77 100644 --- a/layouts/partials/site_head.html +++ b/layouts/partials/site_head.html @@ -211,6 +211,14 @@ {{ $og_image = $share_res.Permalink }} {{ $og_image_width = $share_res.Width }} {{ $og_image_height = $share_res.Height }} + {{ else if .Params.sharing_image }} + {{/* Path relative to `static/`, e.g. `sharing_image: "img/my-image.webp"` - for pages that aren't + Hugo page bundles and so can't use `sharing_image_resource`. */}} + {{ $og_image = .Params.sharing_image | absURL }} + {{ with images.Config (printf "/static/%s" .Params.sharing_image) }} + {{ $og_image_width = .Width }} + {{ $og_image_height = .Height }} + {{ end }} {{ else if .Params.header.image }} {{ $og_image = printf "%s/%s" $media_dir .Params.header.image | absURL }} {{ else if site.Params.sharing_image }}