sfu-stats-beerz / sfu-stats-beerz.github.io

An archive of longer posts to the Stats Beerz mailing list
https://sfu-stats-beerz.github.io
0 stars 1 forks source link

Switch blog to hugo / blogdown #2

Open seananderson opened 6 years ago

seananderson commented 6 years ago

Should be fairly quick and easy. Would make posting code much easier. Probably best to keep hosting on GitHub to maintain same URL. Happy to help someone with this.

prosoitos commented 6 years ago

What about using .Rmd rather than .md as the post default format? GitHub pages is powered by Jekyll and R code blocks will be rendered in the html. I guess Hugo will allow other cool features (nice css, etc.), but as for posting code, I think the current system would already work with .Rmd files... no?

(That said, if you want to set it in blogdown, I would be happy to help to learn the tool).

prosoitos commented 6 years ago

I guess, the info is all out there and well explained.

http://amber.rbind.io/blog/2016/12/19/creatingsite/

https://bookdown.org/yihui/blogdown/

seananderson commented 6 years ago

R markdown and even highlighted code chunks aren’t supported (by default) with Jekyll. blogdown now exists and takes care of rendering R markdown to markdown locally and automatically. By default, blogdown works with Hugo. I recently switched my website from Jekyll to Hugo/blogdown. Should be very easy in this case since I don’t think we care about translating the theme — just the content. With the current set up it’s definitely a bit of a pain to include highlighted code let alone render R output.

prosoitos commented 6 years ago

I see. I write in emacs org mode with my own css file, so my syntax highlighting is already embedded in the html I push to GitHub. So I didn't realize that about Jekyll.

prosoitos commented 5 years ago

Hi Sean. Better late than never... :stuck_out_tongue:

I just learnt how to use Hugo and am in the middle of building my website with it. Since I am deep in this, I am now happy to take on this task (unless you are now using another website engine and your recommendations on what to use have changed. I am very happy with Hugo so far, but feel free to throw advice of course if you have moved on to something else that you like more).

I am deploying my website on netlify, which I find a lot nicer than github pages and which plays extremely well with Hugo. So I plan on doing the same for Stats Beerz, unless you object. I think that I need to be one of the owners of Stats Beerz to set it up. Would you consider adding me to that list? (unless you have an issue with this of course). I am currently external collaborator which only gives me partial permissions.

prosoitos commented 5 years ago

Probably best to keep hosting on GitHub to maintain same URL.

Oops. Just saw that. Netlify is really much nicer to play with. Super easy to deploy from master while allowing to test locally before deployment, site is deployed instantly as soon as you push, no need to delete /public before redeploying (and no git micmac), etc. Even Yihui Xie swears by it.

And netlify allows redirects so I can set one up from the old url.

prosoitos commented 5 years ago

Got an email from Pascale. No pressure if you don't want to move to netlify. I first deployed my Hugo-powered website to Github pages, then read this blog from Yihui Xie https://yihui.name/en/2017/06/netlify-instead-of-github-pages/, and several posts from others, tried netlify and thought that it was an absolute breathe and much nicer/simpler/easier. And since the old url would keep working with the redirect, I thought that it'd be a good idea. But I am of course open to objections! And if your own website is on Github pages and that you are happy with the workflow pushing commits to the site, I am open to learning from you. Yihui Xie's post may not be up to date anymore. I did find that pushing to the Github pages was certainly quite tedious when I first set up my site this way (set up is more complex, have to write a script to delete /public before redeploying, etc.). Netlify is utterly easy: you push to Github and it deploys the site instantly. You can also very easily test your site locally before pushing.