rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 335 forks source link

Blogdown + Hugo (academic) + Medium #423

Closed data-datum closed 4 years ago

data-datum commented 4 years ago

I would like to know how to have a widget to share my Medium posts in blogdown. I have this code

`

<script>MediumWidget.Init({renderTo: '#medium-widget', params: {"resource":"https://medium.com/@data_datum","postsPerLine":1,"limit":4,"picture":"small","fields":["description","author","claps","publishAt"],"ratio":"square"}})</script>`

but I do not know how to share this in my personal profile with blogdown

tcgriffith commented 4 years ago

Easy:

Try it out, if you can't get it to work, then bring your repo back here and I'll try to help.

data-datum commented 4 years ago

I was not ablet to do it. Here is my repo https://github.com/data-datum/rnv-cv

tcgriffith commented 4 years ago

Well, the Academic theme is much complicated than I thought, so my PR above took another path.

In summary:

I Tested and worked on my local machine, please have a look. Also, don't forget to delete the layouts/partials/widget_medium.html under your content/ directory

A note: This is still a bit hacky because the medium account info is hard-coded in the shortcode template. A better way to achieve this might be set up some kind of site parameters in config.toml file