Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] Authors.json #562

Open
kjaymiller opened this issue Nov 5, 2024 · 0 comments
Open

[Add] Authors.json #562

kjaymiller opened this issue Nov 5, 2024 · 0 comments

Comments

@kjaymiller
Copy link
Contributor

kjaymiller commented Nov 5, 2024

Create an Authors.json file that includes the names of the authors of these blog posts and a bio for them.

example:

[
{
"name": "Jay Miller",
"bpd_role": "Executor and Founder, Black Python Devs",
"bio": "Jay is a Staff Developer Advocate based out of Atlanta, GA and when away from the keyboard can often be found cheering on their favorite baseball team.",
"social": "https://linkedin.com/in/kjaymiller",
"website": "https://kjaymiller.com"
}
]
The plan:

This file will be at _data/authors.json so that it's available in site.data.authors. We'll try to match the author name

{% post.author in site.data %}
{% assign author = site.data | find_exp:"entry", name.name == post.author %}
{% if author %}
### About {{author.name}}

{{ author.bio }}
{% if author.social %}
<a href="{{author.social"><SOCIAL ICON</a> <a href="{{author.website}}"><WEBSITE ICON></a>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant