UBC-MDS / UBC-MDS.github.io

UBC MDS blog and academic site
https://ubc-mds.github.io
Other
15 stars 37 forks source link

Twitter card #22

Open jennybc opened 5 years ago

jennybc commented 5 years ago

It would be good to sort out a twitter card for this site. Because here's how the twitter preview looks now:

screen shot 2019-02-11 at 6 20 26 pm

I know essentially nothing about this but @batpigandme and @apreshill have made magic happen for many bookdown and blogdown sites. If you're interested, I bet one of them could point you in the right direction.

batpigandme commented 5 years ago

My favorite guide/the one I used for this is "Socialize your blogdown" (here: https://xvrdm.github.io/2017/10/23/socialize-your-blogdown/ ).

Here's the layout I ended up adding to my template (though the where is theme-dependant): https://github.com/rbind/waxwings/blob/master/layouts/seo/twitter.html

apreshill commented 5 years ago

I know not much about doing this with a jekyll site, but some links:

https://maxchadwick.xyz/blog/twitter-cards-for-jekyll-with-jekyll-seo-tag https://github.com/jekyll/jekyll-seo-tag https://www.brianbunke.com/blog/2017/09/06/twitter-cards-on-jekyll/

batpigandme commented 5 years ago

Oh! Sorry, did not realize this was jekyll. My scripts are probably not relevant.

mgelbart commented 5 years ago

Just recording my (lack of) progress so far. I followed the instructions from the first/second link from @apreshill but it did not solve the problem. I think these may be meant for linking to individual blog posts rather than the blog homepage, but these links already looked fine. Perhaps the 3rd link will solve the problem, but I haven't gotten to it yet. One piece of good news is that there's a place to test what a link is going to look like before posting it. Thanks all for the suggestions!

ttimbers commented 4 years ago

I think we are going to migrate to a blogdown hugo site this summer, so I will keep this open to remind us to do this then.