{"id":712,"date":"2015-02-03T16:06:26","date_gmt":"2015-02-03T23:06:26","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=712"},"modified":"2015-02-03T16:06:26","modified_gmt":"2015-02-03T23:06:26","slug":"slidify-get-started","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2015\/02\/03\/slidify-get-started\/","title":{"rendered":"Slidify Get Started"},"content":{"rendered":"<p>You can install Slidify, write a three page slide deck and publish it to Github, all in less than 5 minutes!<\/p>\n<table class=\"table\">\n<thead>\n<tr>\n<th>Step<\/th>\n<th>Description<\/th>\n<th>Code<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>Install<\/td>\n<td><code>require(devtools)<\/code><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><code>install_github(\"slidify\", \"ramnathv\")<\/code><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><code>install_github(\"slidifyLibraries\", \"ramnathv\")<\/code><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Load<\/td>\n<td><code>library(slidify)<\/code><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Author<\/td>\n<td><code>author(\"mydeck\")<\/code><\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Edit<\/td>\n<td>Write in RMarkdown, separating slides with a blank line followed by three dashes <code>---<\/code>.<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Slidify<\/td>\n<td><code>slidify(\"index.Rmd\")<\/code><\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Publish<\/td>\n<td><code>publish(user = \"USER\", repo = \"REPO\")<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"alert\">\n<p>Note. You will need to create an empty repo on github and replace USER and REPO with your github username and reponame.<\/p>\n<\/div>\n<h3>Step 0: Install Slidify<\/h3>\n<p>Slidify is not on CRAN as yet and needs to be installed from <code>github<\/code>. You can use Hadley&#8217;s <code>devtools<\/code> package to accomplish this easily. You will also need <code>slidifyLibraries<\/code> which contains all external libraries required by Slidify.<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">library<\/span><span class=\"pun\">(<\/span><span class=\"pln\">devtools<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<li class=\"L1\"><code><span class=\"pln\">install_github<\/span><span class=\"pun\">(<\/span><span class=\"str\">'slidify'<\/span><span class=\"pun\">,<\/span> <span class=\"str\">'ramnathv'<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<li class=\"L2\"><code><span class=\"pln\">install_github<\/span><span class=\"pun\">(<\/span><span class=\"str\">'slidifyLibraries'<\/span><span class=\"pun\">,<\/span> <span class=\"str\">'ramnathv'<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<\/ol>\n<h3>Step 1: Author Deck<\/h3>\n<p>This step will create a new directory <code>mydeck<\/code> and add the necessary scaffolding. If you have <code>git<\/code> installed, it will initialize it a <code>git<\/code> repo, checkout its<code>gh-pages<\/code> branch, add and commit everything. Finally, it will open <code>index.Rmd<\/code> for you to edit.<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">author<\/span><span class=\"pun\">(<\/span><span class=\"str\">\"mydeck\"<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<\/ol>\n<h3>Step 2: Edit Deck<\/h3>\n<p>Edit the YAML front matter (if you don&#8217;t know what it is, just replace everything to the right of the <code>:<\/code> in the lines between the <code>---<\/code> right at the top). Edit the deck, making sure to separate your slides by a blank line followed by three dashes <code>---<\/code>.<\/p>\n<h3>Step 3: Generate Deck<\/h3>\n<p>This step generates a html slide deck from <code>index.Rmd<\/code>. It is a static file, which means that you can open it in your browser locally and it should display fine.<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">slidify<\/span><span class=\"pun\">(<\/span><span class=\"str\">\"index.Rmd\"<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<\/ol>\n<h3>Step 4: Publish Deck<\/h3>\n<p>Now is the magical step of publishing your deck to <code>github<\/code>. You have three options: <code>github<\/code>, <code>dropbox<\/code> and <code>rpubs<\/code><\/p>\n<h4>Github<\/h4>\n<p>Login with your github account and <a href=\"https:\/\/help.github.com\/articles\/creating-a-new-repository\">create a new repository<\/a>. Note that Github will prompt you to add a README file, but just use the defaults so that your repo is empty. You will need to have <code>git<\/code> installed on your computer and be able to push to <code>github<\/code> using <a href=\"https:\/\/help.github.com\/articles\/generating-ssh-keys\">SSH<\/a><\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"com\"># replace USER and REPO with your username and reponame<\/span><\/code><\/li>\n<li class=\"L1\"><code><span class=\"pln\">publish<\/span><span class=\"pun\">(<\/span><span class=\"pln\">user <\/span><span class=\"pun\">=<\/span> <span class=\"str\">\"USER\"<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> repo <\/span><span class=\"pun\">=<\/span> <span class=\"str\">\"REPO\"<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> host <\/span><span class=\"pun\">=<\/span> <span class=\"str\">'github'<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<\/ol>\n<h4>Dropbox<\/h4>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">publish<\/span><span class=\"pun\">(<\/span><span class=\"str\">'mydeck'<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> host <\/span><span class=\"pun\">=<\/span> <span class=\"str\">'dropbox'<\/span><span class=\"pun\">)<\/span><\/code><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can install Slidify, write a three page slide deck and publish it to Github, all in less than 5 minutes! Step Description Code 0&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-712","post","type-post","status-publish","format-standard","hentry","category-r"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=712"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/712\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}