Skip to content

Gscan complains about correct usage of {{author}} in context of default.hbs #365

Description

@adamkudrna

This is the logic of my theme's page title in default.hbs which actually works:

    <title>
        {{#is "home"}}
            {{@site.title}} — {{@site.description}}
        {{/is}}
        {{#is "author"}}
            {{author.name}} | {{@site.title}}
        {{/is}}
        {{#is "tag"}}
            {{tag.name}} | {{@site.title}}
        {{/is}}
        {{^is "home, author, tag"}}
            {{meta_title}} | {{@site.title}}
        {{/is}}
    </title>

However, when I run gcan (the latest version, 3.6.0), it throws an error saying:

Checking theme compatibility...

Your theme has 1 error!
----

Errors
------
Important to fix, functionality may be degraded.

- Error: Replace the {{author.name}} helper with {{primary_author.name}} or {{authors.[#].name}}
Files: default.hbs

I think this is a false alarm which should be fixed (I wish I could do it).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions