Skip to content

How to Create an Authors Page in Your Ghost Theme

An authors page gives readers one place to discover every contributor to your Ghost publication.

In this post, I will show you how to add a custom authors page to your Ghost theme. The example uses Casper’s HTML classes and partial names from the version shown in the screenshots. The Ghost helpers apply to other themes, but you will need to adapt the markup to your theme.

Create the Authors Page Theme File

In your theme directory, create a new file and name it custom-authors.hbs and then copy the following code inside it.

{{!< default}}

<header class="site-header">
  <div class="outer site-nav-main">
    <div class="inner">
      {{> "site-nav"}}
    </div>
  </div>
</header>

{{#post}}

<main id="site-main" class="site-main outer" role="main">
  <div class="inner">
    <header class="post-full-header">
      <h1 class="post-full-title">{{title}}</h1>
    </header>

    {{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}}
      <div class="post-feed">
        {{#foreach authors}}
          <article class="post-card {{#unless profile_image}} no-image{{/unless}}">
            {{#if profile_image}}
              <a class="post-card-image-link" href="{{url}}">
                <div class="post-card-image" style="background-image: url({{profile_image}})"></div>
              </a>
            {{/if}}
            <div class="post-card-content">
              <a class="post-card-content-link" href="{{url}}">
                <header class="post-card-header">
                  <h2 class="post-card-title">{% raw %}{{name}}</h2>
                </header>
                <section class="post-card-excerpt">
                  <p>{{bio}}</p>
                </section>
              </a>
            </div>
          </article>
        {{/foreach}}
      </div>
    {{/get}}
  </div>
</main>

{{/post}}

In this code, the #get helper is used to get the blog users. The include attribute is used to get the number of posts. The order attribute is used to order the users list based on the posts attached to them.

Next, the foreach helper is used to loop through each author and render the list with the author profile image, name, URL, and bio.

After adding the template, upload and activate the updated theme. If you edit the files directly on a self-hosted production site, restart Ghost so the template appears in the dropdown.

Create the Authors Static Page

Create the Authors Static Page
  • Create a new page and call it Authors, for example.
  • From Page settings, choose the Authors template from the Template dropdown.
  • Click Publish to publish the page.
Ghost Casper Theme Authors Page

This is an initial example of what you can do with an authors page. You can extend it with each author’s social accounts, location, cover image, and post count. For example, see the authors page in the Nubia theme. You can also add the authors page link to the site navigation.

Ghost Nubia Theme Authors Page

I would recommend checking the official Ghost documentation, including the author-context for more information about the list of available attributes.

More from the Blog

Latest Ghost Themes