From 9135cded3ced713457327904e8e7036d8dfd3ac9 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Wed, 13 May 2026 11:11:52 +0100 Subject: [PATCH] Fix social_url helper fallback documentation The {{social_url}} helper now falls back to sitewide @site values for all 9 platforms (previously only Facebook and Twitter). Bluesky, Instagram, LinkedIn, Mastodon, Threads, TikTok and YouTube are all configurable both per-author and sitewide under Settings > General > Social accounts. --- themes/helpers/data/social_url.mdx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/themes/helpers/data/social_url.mdx b/themes/helpers/data/social_url.mdx index 3ec1bae..1fb0701 100644 --- a/themes/helpers/data/social_url.mdx +++ b/themes/helpers/data/social_url.mdx @@ -6,13 +6,11 @@ description: 'Usage: `{{social_url type="platform"}}` (e.g., `{{social_url type= *** -The `{{social_url}}` helper generates a URL for a specified social media platform based on the provided platform type. It takes a single argument, `type`, which specifies the social media platform (e.g., `facebook`, `mastodon`, etc.). The helper looks for the specified platform in the given context (usually author) and constructs the appropriate URL. +The `{{social_url}}` helper generates a URL for a specified social media platform based on the provided platform type. It takes a single argument, `type`, which specifies the social media platform (e.g., `facebook`, `mastodon`, etc.). -For facebook and twitter, the helper will fall back to the sitewide values if they’re not set on the local context. +When called inside an author scope (e.g. `{{#author}}` or `{{#foreach authors}}`), the helper looks up the platform on the current author first, then falls back to the sitewide value from `@site`. Outside an author scope, it reads directly from `@site`. If neither has a value, the helper outputs nothing. -For the remaining platforms the fallback behaviour is to output nothing. - -Supported platforms include: `facebook`, `twitter`, `linkedin`, `threads`, `bluesky`, `mastodon`, `tiktok`, `youtube`, `instagram`. +Supported platforms: `facebook`, `twitter`, `linkedin`, `threads`, `bluesky`, `mastodon`, `tiktok`, `youtube`, `instagram`. All nine are configurable both per-author (Staff > [user]) and sitewide (Settings > General > Social accounts). ### Examples @@ -24,9 +22,10 @@ Output the author’s Threads URL, using an `author` block: {{/author}} ``` -Globally, Twitter and Facebook are available and can be accessed from anywhere in the theme. +All platforms can be accessed sitewide via `@site`: ```handlebars -{{#if @site.twitter}}Follow us on Twitter{{/if}} -{{#if @site.facebook}}Follow us on Facebook{{/if}} +{{#if @site.twitter}}Follow us on X{{/if}} +{{#if @site.bluesky}}Follow us on Bluesky{{/if}} +{{#if @site.linkedin}}Follow us on LinkedIn{{/if}} ``` \ No newline at end of file