Giter Club home page Giter Club logo

knitr-jekyll's Introduction

kntir-jekyll (with htmlwidgets)

A fork of Yihui's superb knitr-jekyll repo, tweaked to allow it to render htmlwidgets output, using some additional wrapper functions from my personal R package.

This blog-post explains the ins-and-outs of what's going on under the hood to make it all work: brendanrocks.com/htmlwidgets-knitr-jekyll.

Note: This repo stores the source for posts in thier own subdirectories (e.g. ./_source/new-post/2015-12-07-new-post.Rmd), which is purely my personal preference, but is slightly different to the original. This means that to get the blog generated/served, you might have more luck with brocks::blog_gen()/brocks::blog_serve() than the servr::jekyll() defaults.

Installation / Dependencies

R Package Dependencies

To get this repo working, you'll need the wrapper function brocks::htmlwidgets_deps in the brocks package. To render the example post featuring htmlwidgets, you'll also need those packages. Here's the lot:

# Required for the htmlwidgets wrapper functions -----------------------------
# install.packages("devtools")
devtools::install_github("brendan-r/brocks")

# For knitr-jekyll, and the htmlwidgets stuff --------------------------------
install.packages(c(
  "servr",
  "knitr",
  "metricsgraphics",
  "leaflet",
  "threejs",
  "maps"
))

This repo

Clone with git, or just download as a .zip. From there, get editing!

Getting blogging

In addition to Yihui's post on how the system works, I wrote a little guide (with a gentle introduction to static site generation) here: brendanrocks.com/blogging-with-rmarkdown-knitr-jekyll.

knitr-jekyll's People

Contributors

brendan-r avatar cpsievert avatar yihui avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.