Git Product home page Git Product logo

jekyll-now-r-template's Introduction

Add a blog to your website in minutes

This is a template (and tutorial) for creating your blog with R Markdown in minutes.

Implementation

This template is mostly based on Jekyll Now. It adds some adjustments to properly render your posts based on R Markdown files. I'm no expert in HTML so some lines of code may be useless.

Procedure

Prerequisites

  • Make sure that you have the latest versions of R and RStudio.
  • Install package prettyjekyll with devtools::install_github("privefl/prettyjekyll").
  • Make sure that you have enabled Git in RStudio. More information can be found there.
  • You need a GitHub account.
  • You need your own GitHub page. You can find a template (and tutorial) for creating it in minutes there.

Get a first post on your blog

  • Fork this repo (top-right).
  • In the settings of your brand new repo, rename it to be "blog" and make sure that the "GitHub Pages" are activated.
  • Get the link from cloning the repo. Then, go to RStudio, create a New Project > Version Control > Git and copy this link. You have cloned your new repo as an R project.
  • Modify _config.yml.
  • Go knit the R Markdown file in directory _knitr if you want to see its HTML preview in RStudio. Then use prettyjekyll::FormatPost("_knitr/knitr-minimal.Rmd") in the console.
  • Commit and push everything from RStudio.
  • Go see this post at https://YOURGITHUB.github.io/blog.

Get your own post on your blog

  • Create an Rmd document with the template from package prettyjekyll.
  • Fill it, previewing the result with the Knit button. The main content should be the same in your future post.
  • When you have finished, use prettyjekyll::FormatPost on your R Markdown file and commit/push the changes from RStudio.
  • Go verify that it renders well on your blog.

Requirements and features of FormatPost

More information can be found there.

An example

You can see for example the blog part of my own website.

For example,

Why should you care?

I wanted something for creating my website, blogging and posting on it, that

  • was very simple to use,
  • didn't need any further installation (no Jekyll, Ruby or whatever),
  • could be previewed directly from RStudio at any moment.

Conclusion

As a reminder, most credit goes to the contributors of Jekyll Now and its author Barry Clark. I also used parts of the css files and templates in package prettydoc.

If anything is false or not clear enough, feel free to contact me or open an issue.

  • If it is an issue only related with FormatPost, please open an issue there.
  • If it is an issue only related with Jekyll, you'll find a better answer posting there.

jekyll-now-r-template's People

Contributors

privefl avatar

Watchers

James Cloos 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.