Comments (13)
Hi
I´ll publish my slidify in rpubs but the presentation doesn´t appear.
Any idea of what is happening? thanks
title : Introduccion a R
subtitle : Breve, muy breve
author : Antonio Martinez Pineda
job : Division de Educacion Continua Fac. Psicologia
logo : dec.jpg
framework : io2012 # {io2012, html5slides, shower, dzslides,revealjs, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow # {tomorrow,zenburn,kate,tango,pygments}
widgets : [] # {mathjax, quiz, bootstrap}
mode : selfcontained # {selfcontained,standalone, draft}
knit : slidify::knit2slides
from slidify.
I am trying to publish my slide but it just shows a blank page nothing happens. any solutions you can share?
from slidify.
I like the approach taken by showoff
in providing an option that allows users to directly upload a static version of the presentation to the gh-pages
branch of github
. The code is a little cryptic to me as it relies on basic plumbing of github
, but should not be very difficult to replicate in R
.
Here are some lines from the documentation, and the related code from showoff
.
showoff github
: Generates a static version of your site and puts it in a gh-pages branch for static serving on GitHub.
These options are specified after the command.
force
force overwrite of existing Gemfile/.gems and config.ru files if they exist
dotgems
Use older-style .gems file instead of bundler-style Gemfile
password
add password protection to your heroku site
# generate a static version of the site into the gh-pages branch
def self.github
ShowOff.do_static(nil)
`git add static`
sha = `git write-tree`.chomp
tree_sha = `git rev-parse #{sha}:static`.chomp
`git read-tree HEAD` # reset staging to last-commit
ghp_sha = `git rev-parse gh-pages 2>/dev/null`.chomp
extra = ghp_sha != 'gh-pages' ? "-p #{ghp_sha}" : ''
commit_sha = `echo 'static presentation' | git commit-tree #{tree_sha} #{extra}`.chomp
`git update-ref refs/heads/gh-pages #{commit_sha}`
end
from slidify.
RStudio
has come up with an awesome idea for sharing R Markdown
documents. RPubs
allows users to upload html files in a single click, which gets displayed on the RPubs
gallery.
The workhorse is a function rpubsUpload
which automates the uploading process. The first step is to embed images, and I have a script that can do this. The next step is to embed local js and css files. There are two ways I can do this
- Write a helper script that detects all local js and css files and inlines them (OR)
- Upload local js and css files to a CDN and set
lib_path
to the root folder.
Clearly, (2) is easier, if there is a way for me to upload js/css files and serve them from there.
from slidify.
Uploading to RPubs
Should I write a publish_deck
wrapper to encapsulate these steps?
slidify('slides.Rmd', options = list(embed = TRUE))
rPubsUpload('My Presentation', 'slides.html')
from slidify.
Publishing to Github Pages
References
Ideas
Setting up a gh-pages branch in a new repository
git init
git commit --allow-empty -m 'Initial Commit'
git branch gh-pages
git checkout gh-pages
UPDATE. I came across a ruby gem Grancher
that claims to make it simple to publish a gh-pages
branch using rake
tasks. I need to check it out and see if I can port its functionality to R
from slidify.
This works great. I streamlined the publishing process by using a makefile with the following commands
USER := ramnathv
REPO := tempslides
slides: index.html
setup_gh_pages :
git init
git commit --allow-empty -m 'initial commit'
git checkout -b gh-pages
touch index.Rmd
git add .
git commit -a -m 'set up deck as gh-pages branch'
add_gh_remote:
git remote add github https://github.com/$(USER)/$(REPO).git
deploy: slides
git push origin gh-pages
%.html: %.Rmd
Rscript -e "library(slidify); slidify('$<', '$@')"
from slidify.
Another publishing option is googlecode
which can serve an html file at
http://{{projname}}/googlecode.com/git/{{path/to/html}}
The first step is to create a googlecode
git repository for the project and then run the following deployment commands
git remote add googlecode https://code.google.com/p/{{projname}}.git
git push googlecode gh-pages:master
Note that it is important to push to the master
branch, since for some reason html files in other branch give a 404. I have not verified if pushing to master works as yet, but I am pretty certain it does.
from slidify.
I think it would be a good idea to have an option of keeping both branches, master
and gh-pages
. I can use the strategy of subtree
merge and a post-commit-hook
to keep the gh-pages
branch updated.
TODO. Outline different possible workflows and post on SO asking what are the advantages and disadvantages.
from slidify.
I can take some ideas from the rake
tasks used by octopress
.
rake setup_gh_pages
- Ask you for your Github Pages repository url.
- Rename the remote pointing to imathis/octopress from ‘origin’ to ‘octopress’
- Add your Github Pages repository as the default origin remote.
- Switch the active branch from master to source.
- Configure your blog’s url according to your repository.
- Setup a master branch in the _deploy directory for deployment
I can modify this to step through the following sequence instead
- Add your Github Username and Repo to Makefile.
- Add your Github Pages repository as a remote named github.
from slidify.
Another decision to make is whether to provide a makefile
or embed the git
commands inside an R function. The case for a makefile is that it is more transparent and hence allows for easier customization. A second advantage is that it allows running slidify
from the command line. Finally, pairing make
with watch
, I get guard
for free which can be very useful while editing presentations.
One way I can make progress on this is to write a detailed makefile with steps for each process. It would then be easy to embed the commands within an R function. I can decide later which of the two options I want to pursue.
Here is some inspiration from octopress
rake
tasks
rake install
rake generate
rake watch
rake new_post
rake new_page
rake deploy
rake setup_github_pages
from slidify.
I have implemented this feature. I might revisit this page for picking up pointers I missed.
from slidify.
I wonder how you can publish your slidify in sites.google.
from slidify.
Related Issues (20)
- User-Defined Functions in Slidify HOT 2
- incremental reveal of heading?
- slidify embeds plotly plots as images rather than as normal interactive plots
- Is it possible to support two column layout in reveal.js ? HOT 2
- status 127 after running publish_github()
- How to write chemical formula in slidify
- Is slidify dead?
- Slidify for Music Tracks
- Coudn't find ggpairs and grid.arrange
- Slidify slides not rendering in browser HOT 3
- foo
- era
- Unable to correctly publish slidify slides to RPubs - generates blank page? HOT 2
- Separator slides
- Quiz randomization
- Dead link on slidify.org
- Hide 1st 2 slides during presentation
- Instal phyloseq HOT 1
- no clean subscript in title HOT 1
- Error in markdownExtensions() while calling slidify() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slidify.