Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

How do you create an author page?

Solved by Aaron Dalton View solution

Started by Marco Cevoli 8 years ago · 1 replies · 874 views
8 years ago

Hi,
I would like to know how you can create an author's page showing:

  • author's bio
  • author's photo
  • latest articles by this author

So far, I've added author: John Doe to the frontmatter and

TWIG
{% if page.header.author %} 
<span class="author">{{ "AUTHOR"|t }}: {{ page.header.author }}</span>
{% endif %}

to
/public_html/user/themes/mytheme/templates/partials/blog_item.html.twig
so that the author name, if any, shows up in the blog post.

I'd like to add a <a href> to this part, like the pages that Grav creates for tags, but I don't know where to start.

Any help will be appreciated. TIA.

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 1 week ago
4 157 6 days ago
Support · by nwhitfield, 1 week ago
2 136 1 week ago
Support · by stell, 3 weeks ago
5 369 2 weeks ago
Support · by gravinator, 1 month ago
5 559 2 weeks ago
Support · by Gravver, 3 weeks ago
6 347 3 weeks ago