gscan
gscan copied to clipboard
Gscan complains about correct usage of `{{author}}` in context of `default.hbs`
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).
This issue is a good example of why migrating to AST-based rules for author-related errors like done here is a good idea.