Open nathankot opened 10 years ago
we can also load up a json file with "Authorship" to contain things like twitter accounts, bio, etc to generate during site build. With gravatar support if needs be, could help with Google Rankings
hmmm i was thinking more, we add that data to every post we make e.g:
---
author: Nathan Kot
author_email: me@nathankot.com
tiwtter: nathankot
---
And then we go through all the posts at compile-time to create an author list, using the latest property if there is a clash:
site.posts.map do |post|
{ email: post.author_email, name: post.author, twitter: post.twitter }
end.uniq do |author|
author.email
end
Saves us from maintaining a separate list, but downside is that there is less flexability if we want to hide authors, or show authors with no posts hmmmm
Ya I was more thinking we could link the Author Name up with the Git Real Name, and then check a static json file for that user, and then display the fields if they appear, purely so we had one area to manage it (and future authors), im not too concerned but having a bio in each post (should we want one) is quite a bit of cruft to have in each post. Just my opinions though, can work with either, snipmate ftw.
It's true that if we want to add bio's this would be pretty shitty lol,
although yaml would prob be a better format than json just b/c everything
else is in yaml. Another way could be to have an authors/
folder and
separate .yml
files for each author - what do you think?
ᐧ
On Sun, Aug 31, 2014 at 2:49 PM, Kyle Mcgill notifications@github.com wrote:
Ya I was more thinking we could link the Author Name up with the Git Real Name, and then check a static json file for that user, and then display the fields if they appear, purely so we had one area to manage it (and future authors), im not too concerned but having a bio in each post (should we want one) is quite a bit of cruft to have in each post. Just my opinions though, can work with either, snipmate ftw.
— Reply to this email directly or view it on GitHub https://github.com/devsnull/devsnull.github.io/issues/1#issuecomment-53976641 .
The only reason i suggested .json was because it can remain static in the site publicly, and just have a
$.ajax('/authors.json', function (data) {
//loop through and find user, -> .html() content to page
});
yaml also works if we the rendering into the pages prior, im not fussed just dumping some ideas
We can scrape
site.posts
and create a list of authors that have contributed.