Latest or nearly so Ghost, local install and/or Ghost Pro, MySQL 8.
I have a theme that runs fine but won’t install. Here’s the error message:
Image text: Fatal error: Replace …/author with …/primary_author or …/authors.[#]
Unfortunately, this is on the author.hbs template. primary_author doesn’t work there. I tried wrapping in the {{#author}} context, but I’ve got some complexity with a match statement with an else, and these playing well together.
gscan bug?
This is my author.hbs code currently (abbreviated):
Except mine’s a fatal error, not just a ‘throw the error and install the theme anyway’ error.
The problem I’m hitting is that I need to do that get to see if there’s a page with the author slug’s slug, and then fall back to showing the author page specified below if not. I can’t close the ‘get’ because I lose the counter variable, but with it open, the {{#author}} context doesn’t work. I fussed around with if vs match vs etc to see if behavior as different, but it wasn’t.
I have settled for the moment for adding a style tag within the #foreach with CSS styling that hides all the author content that the second section writes out. That’s a dumb solution, but it gets the job done.
Thanks, but I think writing out the <style>.no-slug-time {display:none}</style> style right in the theme file is probably easier to execute and maintain than making sure that .slug-time is scrupulously empty. Squashing whitespace in handlebars is a real drag for readability.