You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not able to use {{#author}} in an author-:slug.hbs file, due to that helper being deprecated.
The documentation here specifies that the {{#author}} helper can be used in author.hbs and author-:slug.hbs files.
If I activate the theme in Ghost, and then add the author-:slug.hbs file, bypassing the theme validator, the {{#author}} helper works as expected.
Steps to Reproduce
Fork a theme (I'm using Casper)
Create an author-:slug.hbs file. (author-april.hbs for example).
Upload to Ghost and attempt to activate, or use a GitHub action to process with Theme Validator. It fails due to {{#author}} being deprecated.
Ghost Version
N/A
Node.js Version
N/A
How did you install Ghost?
Docker
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
{
"name": "ThemeValidationError",
"context": null,
"type": "ThemeValidationError",
"details": {
"checkedVersion": "5.x",
"name": "casper",
"path": "/tmp/5b88c8f1-d260-4fbd-90c8-f0fff3a993fd",
"version": "5.4.1",
"errors": [
{
"fatal": true,
"level": "error",
"rule": "The <code>{{#author}}</code> block helper should be replaced with <code>{{#primary_author}}</code> or <code>{{#foreach authors}}...{{/foreach}}</code>",
"details": "The usage of <code>{{#author}}</code> block helper outside of <code>author.hbs</code> is no longer supported andshould be replaced with <code>{{#primary_author}}</code> or <code>{{#foreach authors}}...{{/foreach}}</code>.<br>Ghost allows multiple authors to be assigned to a post, so all helpers have been reworked to account for this.<br>Find more information about the <code>{{authors}}</code> helper <a href=\"https://ghost.org/docs/themes/helpers/authors/\" target=_blank>here</a>",
"regex": {},
"notValidIn": "author.hbs",
"helper": "{{#author}}",
"failures": [
{
"ref": "author-april.hbs",
"message": "Please remove or replace {{#author}} from this template"
}
],
"code": "GS001-DEPR-AUTHBL"
}
]
},
"property": null,
"help": null,
"code": null,
"id": "e640bd60-63e0-11ed-8f1c-470fc967c6af",
"ghostErrorCode": null
}
Code of Conduct
I agree to be friendly and polite to people in this repository
The text was updated successfully, but these errors were encountered:
Issue Summary
I'm not able to use
{{#author}}
in anauthor-:slug.hbs
file, due to that helper being deprecated.The documentation here specifies that the
{{#author}}
helper can be used inauthor.hbs
andauthor-:slug.hbs
files.If I activate the theme in Ghost, and then add the
author-:slug.hbs
file, bypassing the theme validator, the{{#author}}
helper works as expected.Steps to Reproduce
author-april.hbs
for example).{{#author}}
being deprecated.Ghost Version
N/A
Node.js Version
N/A
How did you install Ghost?
Docker
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
Code of Conduct
The text was updated successfully, but these errors were encountered: