Social_url Helper Fails GScan Validation (Despite Official Docs Example)

Hi,

I’m encountering a Handlebars syntax error when using the social_url helper as documented in the Social Links documentation.

Issue Description

When I add this code to my author.hbs:

{{#if twitter}}
    <a href="{{social_url type="twitter"}}">Twitter</a>
{{/if}}

I receive this error from Ghost Gscan CLI:
Template must contain valid Handlebars

Environment

  • Ghost Version: 5.0+ (specified in package.json)
  • Theme engine requirement:
"engines": {
    "ghost": ">=5.0.0"
}

Expected Behavior

The documented syntax should work per:

{{#author}}
    {{#if threads}}<a href="{{social_url type="threads"}}">Threads</a>{{/if}}
{{/author}}

What i’m missing?

Thanks for your help!

I’m going to guess that your version of gscan is outdated. You’ll need to update it.

Thank you for the suggestions! It resolved the issue—it turned out to be caused by an outdated version of GScan . After updating, the {{social_url type="twitter"}} syntax passed validation without errors.

Note: The GScan web tool appears to be offline (503 Service Temporarily Unavailable)

Thanks again.