Document {{#social_accounts}} block helper#62
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a new MDX reference page for the {{ Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
eedca3a to
c979233
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@themes/helpers/data/social_url.mdx`:
- Line 15: The PR added a cross-link mentioning `{{`#social_accounts`}}` but the
PR objectives stated that this link should be deferred to avoid conflict with PR
`#61`; either remove the new cross-link sentence referencing `social_accounts`
from the content or update the PR objective/note to state that the
`social_accounts` cross-link will be included now, ensuring the change in intent
is reflected in the PR description and release notes; locate the added text that
contains `{{`#social_accounts`}}` and either delete that sentence or rewrite the
PR metadata to match the new plan.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 16042669-7d5c-4c0a-a48c-2d759c3db303
📒 Files selected for processing (4)
docs.jsonthemes/helpers/data.mdxthemes/helpers/data/social_accounts.mdxthemes/helpers/data/social_url.mdx
New block iterator helper added in TryGhost/Ghost#27834. It yields each connected social account on a given source object (@site or author), replacing repetitive {{#if twitter}}…{{#if facebook}}… chains in themes. Per-iteration it exposes {type, href, username, name} so themes keep full control of markup. Adds the new page under Data helpers, links it from the index table, and slots it into the docs.json nav next to {{social_url}}.
c979233 to
1244668
Compare
The helper emits {{type}}: "x" for the X/Twitter platform (matching the admin UI label and theme partial conventions); the docs were referencing the legacy storage key. See TryGhost/Ghost#27871.
Summary
Documents the new
{{#social_accounts}}block helper (added in TryGhost/Ghost#27834 and now shipped). The helper iterates the connected social accounts on a given source object — typically@siteor an author — replacing ~27 lines of repetitive{{#if twitter}}…{{#if facebook}}…blocks in theme templates with a single iterator, while keeping themes in full control of markup, classes, and icon partials.Changes
themes/helpers/data/social_accounts.mdx— New page. Covers the explicit-source design, four usage examples (@site, inside{{#foreach authors}}, on author pages, with{{else}}), the per-iteration attributes (type,href,username,name), the supported platform list, and a short rationale for why the source must be explicit.themes/helpers/data.mdx— Adds a row forsocial_accountsto the data helpers index table, immediately abovesocial_url.docs.json— Adds the new page to the Data helpers nav, alphabetised next tosocial_url.themes/helpers/data/social_url.mdx— Adds a one-line cross-link pointing readers at{{#social_accounts}}for the "render all connected platforms at once" use case. (Held back from Fix social_url helper fallback documentation #61 to avoid an in-flight conflict; included here now that Fix social_url helper fallback documentation #61 has merged.)Companion / related
social_accountsto gscan'sknownHelpers{{social_url}}fallback documentation fix (merged)