Hello everyone,
In the Ghost backend (version 5.89.6), I’m encountering the following error message:
The {{#author}} block helper should be replaced with {{#primary_author}} or {{#foreach authors}}…{{/foreach}}
Here is an attached screenshot:
Here’s my underlying thought:
For each author with a fixed slug /author/surname-name/
, I create a corresponding file in the backend. This file is named author-surname-name.hbs
.
I’m currently using the following code:
{{#author}}
<header class="archive-section">
<div class="archive-wrap">
<div class="archive-container is-custom">
<div class="archive-content is-custom">
<div>
{{>images/author_image}}
<h1 class="archive-title">{{name}}</h1>
</div>
{{#if bio}}
<p class="archive-description">
{{bio}}
</p>
{{/if}}
</div>
<div class="border-separator"></div>
<nav class="filter global-tags">
<a href="#beitraege">All Posts</a>
<a href="#biographie">Biography</a>
<a href="#themenschwerpunkte">Key Topics</a>
<a href="#expertise">Expertise & Competence</a>
<a href="#erfahrung">Experience</a>
<a href="#kontakt">Contact</a>
</nav>
</div>
</div>
</header>
{{/author}}
<section id="beitraege" class="mb-72 mb-36-m scrolling-container relative">
{{>misc/background}}
<h2 class="subtitle mx-auto mw-1120 mx-18-m">All posts by <span>{{#author}}{{name}} {{/author}}</span></h2>
<div class="scrolling-wrapper-flexbox horizontal-swipe">
{{#foreach posts}}
{{>loop-item-first}}
{{/foreach}}
</div>
{{>misc/buttons}}
</section>
The goal is to display specific information (profile picture, name, etc.) and posts for each author. How can I achieve the same functionality without constantly receiving the error in the backend?
Here is a working example on the live site: Daniel Wenz - Bitcoin2Go