building author archive pages with front matter only
Why Author Archives Matter
Author archive pages give readers a way to explore content from a specific contributor. They’re especially useful for multi-author blogs, collaborative projects, or publications where author voice plays a significant role in content branding.
Jekyll's Challenge with Author Archives
By default, Jekyll does not generate dynamic author pages like WordPress. Plugin-based solutions exist, but on GitHub Pages, plugin usage is limited. So we use front matter fields and Liquid templates to manually define and filter posts by author.
Step 1: Add Author Metadata to Posts
First, ensure every post includes an author field in its front matter. Use a consistent naming convention (e.g., slug or lowercase names):
--- title: "How to Optimize Content for Keywords" date: 2025-05-10 author: "john-doe" ---
Repeat this for all relevant posts using their respective author identifiers.
Step 2: Create an Author Layout
Create a new layout file in your _layouts directory, for example: _layouts/author.html
Sample author.html layout:
{% raw %}
<h2>Posts by {{ page.author_name }}</h2>
<ul>
{% assign author = page.author_slug %}
{% for post in site.posts %}
{% if post.author == author %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endraw %}
Step 3: Create Author Pages
In your project root or inside a folder like authors, create separate HTML or Markdown files for each author. For example: john-doe.md
--- layout: author title: "John Doe" permalink: /authors/john-doe/ author_slug: "john-doe" author_name: "John Doe" ---
This setup filters posts by the author field matching author_slug.
Optional: Add Author Bios and Avatars
To personalize author pages further, define a new data file: _data/authors.yml
john-doe: name: "John Doe" bio: "A technical writer passionate about performance SEO." avatar: "/assets/img/john.jpg" jane-smith: name: "Jane Smith" bio: "Writes about digital trends and content strategy." avatar: "/assets/img/jane.jpg"
Update author layout to pull this info:
{% raw %}
{% assign author_data = site.data.authors[page.author_slug] %}
<div class="author-profile">
<img src="{{ author_data.avatar }}" alt="{{ author_data.name }}" />
<p><strong>{{ author_data.name }}</strong></p>
<p>{{ author_data.bio }}</p>
</div>
{% endraw %}
Step 4: Link to Author Pages from Posts
At the bottom of each post layout, add a link to the author's archive:
{% raw %}
<p>Written by <a href="/authors/{{ page.author }}">{{ page.author }}</a></p>
{% endraw %}
If you’re using a data file for names, you can reference the full name from the author database using:
{% raw %}
{% assign author_info = site.data.authors[page.author] %}
<p>Written by <a href="/authors/{{ page.author }}">{{ author_info.name }}</a></p>
{% endraw %}
Case Study: A Jekyll-Powered Magazine
An online magazine with five recurring contributors used this approach to highlight authors. Each writer had their own archive and bio. They even integrated social media handles into the author profiles for increased engagement. By manually creating these pages, the team avoided plugin dependency and retained GitHub Pages compatibility.
Benefits of Manual Author Pages
- Plugin-free, works on GitHub Pages
- Fully customizable layout and style
- Supports author bios and images
Limitations
- Requires manual creation of author pages
- Needs consistent metadata in posts
Best Practices
- Use slugs for authors instead of full names to avoid URL issues
- Use a central data file for all author metadata
- Keep author pages updated as contributors grow
Conclusion
Even without dynamic page generation or plugins, Jekyll allows for robust author archives through smart use of front matter and Liquid logic. It’s a lightweight, future-proof solution ideal for static blogs and multi-author platforms hosted on GitHub Pages or similar environments.
