Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Blogging with R

Blogging with R

Muhammad Aswan Syahputra

November 15, 2018
Tweet

More Decks by Muhammad Aswan Syahputra

Other Decks in Programming

Transcript

  1. dplyr::glimpse(aswan) Founder of Expertise in sensory science and consumer studies

    Education: Master in Sensory Science, Wageningen University and Research, The Netherlands Bachelor in Food Technology, Universitas Brawijaya, Indonesia Sensolution.ID Telegram: @aswansyahputra [email protected]
  2. Why should we? Don’t shoot yourself in the foot! Code

    and document your works Don’t let your code scattered and stayed only in your computer Be efficent! Code, document, and publish in one workflow Is your code and approach good enough? Get some feedbacks! Help the others! Enrich R resources in Bahasa Indonesia
  3. my_blog <- r + hugo + git R packages: rmarkdown,

    blogdown IDE RStudio Hugo Using R: blogdown::install_hugo() GNU/Linux: sudo snap install hugo --classic Other: consult Git GitHub account here
  4. Steps: Generation File - New Project - New Directory -

    Website using blogdown Choose theme at . Filled out ‘Hugo theme’ (e.g. ‘nathancday/min_night’) Copy archetypes in themes/the-theme into project working directory (recommended!) blogdown::build_site() / blogdown::serve_site() (Addins - Serve Site) themes.gohugo.io
  5. Steps: Deployment In R : file.create("public/.nojekyll") and blogdown::hugo_build Create GitHub

    repository ‘username.github.io’ In Terminal: cd public git init git remote add origin https://github.com/user/repo.git git add . git commit -m 'init'
  6. What next? Config and write! Configure the ‘config.toml’ Add new

    post: Addins - New Post Inspect it locally: blogdown::serve_site() If OK, in R blogdown::hugo_build then publish it: cd public git add . git commit -m 'added new content' git push origin master