Skip to content

Added social_accounts to v6 knownHelpers#802

Merged
ErisDS merged 1 commit into
mainfrom
add-social-accounts-helper
May 12, 2026
Merged

Added social_accounts to v6 knownHelpers#802
ErisDS merged 1 commit into
mainfrom
add-social-accounts-helper

Conversation

@ErisDS
Copy link
Copy Markdown
Member

@ErisDS ErisDS commented May 12, 2026

Summary

Adds social_accounts to v6 knownHelpers so themes using the new helper don't trip Handlebars' unknown-helper validation.

The helper is a block iterator over a site's or author's connected social accounts. It replaces the ~27 lines of repetitive {{#if twitter}}…{{#if facebook}}… blocks themes currently need to render a row of social icons. Per-iteration it exposes {type, href, username, name} so themes keep full control of markup.

{{#social_accounts @site}}
    <a href="{{href}}" target="_blank" rel="noopener" aria-label="{{name}}">
        {{> (concat "icons/" type)}}
    </a>
{{/social_accounts}}

Companion PR: TryGhost/Ghost#27834

Test plan

  • yarn test — 403 passing, no regressions
  • yarn lint — clean

Matches the precedent set by #742 (Added missing knownHelpers for Ghost v6 helpers).

New block helper added in TryGhost/Ghost#27834 — iterates connected social accounts on a given source (site or author) so themes can replace ~27 lines of repetitive {{#if twitter}} blocks with a single iterator. Adding to v6 knownHelpers so themes using it don't trip Handlebars' unknown-helper check.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f927e7c3-6541-4ac2-b272-a8d37d4758b6

📥 Commits

Reviewing files that changed from the base of the PR and between 491629a and 2dd0166.

📒 Files selected for processing (1)
  • lib/specs/v6.js

Walkthrough

The v6 specification module in lib/specs/v6.js is updated to recognize social_accounts as an additional known helper. The change extends the knownHelpers array used in the v6 spec, which is then merged with the v5 helper set during export. No structural changes to the module interface or export contract are made.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding social_accounts to v6 knownHelpers, which is clear and specific.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of the social_accounts helper, its functionality, and test results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-social-accounts-helper

Comment @coderabbitai help to get the list of available commands and usage tips.

@ErisDS ErisDS merged commit cf3623e into main May 12, 2026
3 checks passed
@ErisDS ErisDS deleted the add-social-accounts-helper branch May 12, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant