Skip to main content

{{authors}} is a formatting helper for outputting a linked list of authors for a particular post. It defaults to a comma-separated list (without list markup) but can be customised to use different separators, and the linking can be disabled. The authors are output in the order they appear on the post, these can be reordered by dragging and dropping. You can use the translation helper for the prefix and suffix attribute.

Example code

The basic use of the authors helper will output something like ‘sam, carl, tobias’ where each author is linked to its own author page:
{{authors}}
You can customise the separator between authors. The following will output something like ‘sam | carl | tobias’
{{authors separator=" | "}}
Additionally you can add an optional prefix or suffix. This example will output something like ‘More about: sam, carl, tobias’.
{{authors separator=" | " prefix="More about:"}}
You can use HTML in the separator, prefix and suffix arguments. So you can achieve something like ‘sam • carl • tobias’.
{{authors separator=" • "}}
If you don’t want your list of authors to be automatically linked to their author pages, you can turn this off:
{{authors autolink="false"}}
If you want to output a fixed number of authors, you can add a limit to the helper. E.g. adding a limit of 1 will output just the first author:
{{authors limit="1"}}
If you want to output a specific range of authors, you can use from and to either together or on their own. Using to will override the limit attribute. E.g. using from=“2” would output all authors, but starting from the second author:
{{authors from="2"}}
E.g. setting both from and to to 1 would do the same as limit=“1” {{authors from="1" to="1"}} is the same as {{authors limit="1"}}

The visibility attribute

As of Ghost 0.9 posts, tags and users all have a concept of visibility, which defaults to public. By default the visibility attribute is set to the string “public”. This can be overridden to pass any other value, and if there is no matching value for visibility nothing will be output. You can also pass a comma-separated list of values, or the value “all” to output all items.
{{authors visibility="all"}}

Advanced example

If you want to output your authors completely differently, you can fully customise the output by using the foreach helper, instead of the authors helper. Here’s an example of how to output list markup:
{{#post}}
  {{#if authors}}
    <ul>
    {{#foreach authors}}
      <li>
        <a href="{{url}}" title="{{name}}" class="author author-{{id}} {{slug}}">{{name}}</a>
      </li>
    {{/foreach}}
    </ul>
  {{/if}}
{{/post}}

List of author attributes

  • slug - Unique URL-friendly identifier for the author. Used in routing.
  • id - Unique database identifier for the author.
  • name - Full display name of the author.
  • profile_image - URL of the author’s profile avatar image.
  • cover_image - URL of the author’s cover/banner image.
  • bio - Short biography or description of the author.
  • website - Personal website or portfolio link.
  • location - Author’s geographical location.
  • facebook - Facebook username (without full URL).
  • twitter - Twitter/X handle.
  • threads - Threads profile username.
  • bluesky - Bluesky handle.
  • mastodon - Mastodon handle or full URL.
  • tiktok - TikTok username.
  • youtube - YouTube channel handle.
  • instagram - Instagram username.
  • linkedin - LinkedIn username.
  • meta_title - Custom SEO title for the author page.
  • meta_description - Custom SEO description for the author page.
  • url - Absolute URL to the author’s public profile page.

primary_author

To output just the singular, first author, use the {{primary_author}} helper to output a simple link. You can also access all the same attributes as above if you need more custom output.
{{#primary_author}}
<div class="author">
    <a href="{{url}}">{{name}}</a>
    <span class="bio">{{bio}}</span>
</div>
{{/primary_author}}