drand / website

Drand webpage, docs and blog 📚
https://drand.love
Other
3 stars 13 forks source link

Adds author var to post and postlist page. #141

Closed johnnymatthews closed 2 years ago

johnnymatthews commented 2 years ago

This PR allows writers to add their name to a post by using the author variable in the blog post front-matter. This PR does not change any of the blog posts though - no author variables have been added to posts yet.

---
title: "drand @ NorthSec"
summary: "Drand was recently presented at the North Sec conference! Here is a brief summary of the event and the drand talk, as well as the answers to a few of the interesting questions we received."
date: 2022-06-24
author: "Johnny"
---

_Drand was recently presented at the North Sec conference! Here is a brief summary of the event and the drand talk, as well as the answers to a few of the interesting questions we received._

image

image

yiannisbot commented 2 years ago

@johnnymatthews Thanks! Quick question in case we need it in the future: can we add multiple authors to one post?

johnnymatthews commented 2 years ago

Yeah you can do, just add another name into that string:

author: "Johnny, Yiannis, Juan"

There's no fancy checking or anything to see if authors is an array. It just accepts a string. We can potentially make it a bit more interesting by having the authors name links, and by clicking on it you can see all the posts that author has written! But that's quite a bit of work, and wouldn't be a priority for myself right now.

yiannisbot commented 2 years ago

Understood, thanks! No need to put time into making it a linked list. We've got few posts and from a few people right now. We can think about it later.