I am interested in using different layouts for different slides within my index.Rmd file. after copying the template provided here and below, I created a .html file in my assets/layouts
folder.
<slide class="{{ class }}" id="{{ id }}">
<hgroup>
{{{ header }}}
</hgroup>
<article>
<hr noshade size=4 color='red'>
{{{ content }}}
<div class='left' style='float:left;width:48%'>
{{{ left }}}
</div>
<div class='right' style='float:right;width:48%'>
{{{ right }}}
</div>
</article>
</slide>
having got this far, it remains unclear:
1) why the slides in my deck are blank and not displaying any of the below:
---
#testing
hello
*** left
- point a
- point b
- point c
*** right
- point a
- point b
- point c
2) how to "call" the custom layout from my assets folder for an individual slide and not the whole deck
You can specify a layout for a slide as metadata. For example, if you saved the layout you describe in the question as twocol.html
in assets/layouts
, then you can specify the layout in the slide level metadata. A &
specifies a layout, while a .
specifies a class and a #
specifies an id. You are also free to define your own custom metadata as key:value
pairs.
--- &twocol
## Two Columns
*** left
- point a
- point b
- point c
*** right
- point a
- point b
- point c
来源:https://stackoverflow.com/questions/15259455/customizing-slide-layouts-in-slidify