GSA / digital.gov

DEPRECATED 🛑-The future site of Digital.gov
https://www.digital.gov
4 stars 4 forks source link

Add social links + GitHub to author pages #73

Closed thisisdano closed 7 years ago

thisisdano commented 7 years ago

Outputs like so: https://federalist-proxy.app.cloud.gov/preview/gsa/digital.gov/dw-author-social/authors/foo-qaz/

screen shot 2017-07-18 at 2 02 13 pm

Note that this uses some more fields in the author.yml:

uid           : foo-qaz
display_name  : Foo B. Qaz
first_name    : Foo
last_name     : Qaz
email         : foo.b.qaz@government.gov
website       : http://fooqaz.party
gravatar      : foo.b.qaz@government.gov
bio           : Oh, foo. Just _another_ WordPress bio.
location      : Ann Arbor, MI
quote         : Oh bar-other!
github        : fooqaz_github
twitter       : fooqaz_twitter
youtube       : fooqaz_youtube
facebook      : fooqaz_facebook
linkedin      : fooqaz_linkedin

Note also that this adds a new github field/icon(!)

jeremyzilar commented 7 years ago

Are these the fields that we'll be using? I think the gravatar one will be confusing. Would prefer if we could pull that img from Github so that the sign-up process for identity occurs in one place.

jeremyzilar commented 7 years ago

It would be nice to list out where the contributor/author is located, to better show how distributed people are (or can be). Adds the possibility for a nice national, human element to bios.

thisisdano commented 7 years ago

Used gravatar since it was simple. Adding GitHub would require learning how to use an API, I think. Which I suppose I have to do at some point... And if we did pull via an API, would this make the builds super slow? Would we want to do it via js? These are all Qs I didn't feel prepared to answer!

jeremyzilar commented 7 years ago

We can take the github username, and add it into this URL https://github.com/thisisdano.png?size=202 — link

We can append .png to the URL for the User's profile to get redirected to their avatar. We can add the query param size to specify a size smaller than the default of 460px wide (i.e. it won't allow larger than 460).

jeremyzilar commented 7 years ago

Sorry, I should have mentioned that I looked this up a few weeks back.

thisisdano commented 7 years ago

Oh nice. :boom: