Added social_accounts to v6 knownHelpers#802
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
social_accountsto v6knownHelpersso 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.Companion PR: TryGhost/Ghost#27834
Test plan
yarn test— 403 passing, no regressionsyarn lint— cleanMatches the precedent set by #742 (Added missing knownHelpers for Ghost v6 helpers).