15

I am using the latest version of Rstudio (and knitr) and I have installed the development version of slidify from github. Slidify allows you to go straight from Rmarkdown to html5slides with 1 click.

My issue is that I would like to add an image to the title slide, but using the normal Rmarkdown syntax does not work. I think this is because the first slide is specified as a YAML.

title       : 
subtitle    : 
author      : 
job         : 
framework   : io2012        # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : tomorrow      # 
widgets     : []            # {mathjax, quiz, bootstrap}
mode        : selfcontained # {standalone, draft}

If I add anything to this first slide specification, I get an error in the function yaml.load() which parses the YAML. Is there a way to specify a background image using YAML?

Andrew Barr
  • 3,589
  • 4
  • 18
  • 28

1 Answers1

13

The title-slide in io2012 framework is marked with the class title-slide. So you can customize the slide using css. For example, if you want to specify a background image, you need to add the following css.

  .title-slide {
     background-image: url(http://goo.gl/cF6W2);
   }

You can either add it directly to your Rmd file by enclosing it with <style></style> tags or to a custom css file in assets/css, which will automatically be included when you run slidify.

Hope this is useful.

EDIT. If you want to customize the appearance of the title slide further, you can tweak the lines in libraries/frameworks/io2012/layouts/deck.html.

Ramnath
  • 54,439
  • 16
  • 125
  • 152
  • Thanks Ramnath. What an awesome package! What's the best resource for slidify documentation at this point? – Andrew Barr Mar 07 '13 at 15:47
  • At this point, it would be http://slidify.org, but I plan to document more extensively. For questions, the best place would be SO or the issues page on github. – Ramnath Mar 07 '13 at 15:56