How to add the author name?

I also want to add the author name to the posts.

What should I do for that?

should be pretty easy, just add front matter to the post - author: Bob Smith and then in the layout you can do {{}} you could also test to see if it exists by doing an if:

{% if %}Written by: {{}}{% endif %}

Will this code work?

{% if %}
  {% include author/{{}}.html %}
{% endif %}

If we have lots of authors and we want to include a file specific to the author name.


If we add the author: -name-, then will it also show up in the RSS feed?

1 Like

That should work. You could also do the following:

author: 'Author Name'

{% include author-bio.html name: %}

Then you could deal with the logic inside the partial