There are three things you need to do
- Add
widget: bootstrap
in YAML front matter - Ensure carousel template in
assets/layouts/carousel.html
- Markup carousel slide with
&carousel
to make use of layout.
Ramnath Vaidyanathan
There are three things you need to do
widget: bootstrap
in YAML front matter assets/layouts/carousel.html
&carousel
to make use of layout.--- &carousel .span12
## Carousel
*** {class: active, img: "http://placehold.it/960x500"}
Image 1
*** {img: "http://placehold.it/960x500"}
Image 2
---
layout: slide
---
{{{ slide.content }}}
<div id="{{slide.id}}-carousel" class="carousel slide {{slide.class}}">
<!-- Indicators -->
<ol class="carousel-indicators">
{{# slide.blocks }}
<li data-target="#{{slide.id}}-carousel" data-slide-to="{{num}}" class="{{class}}"></li>
{{/ slide.blocks }}
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
{{# slide.blocks }}
<div class="item {{class}}">
<img src="{{img}}" alt="{{alt}}">
<div class="carousel-caption">{{{ content }}}</div>
</div>
{{/ slide.blocks }}
</div>
<!-- Controls -->
<a class="left carousel-control" href="#{{slide.id}}-carousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#{{slide.id}}-carousel" data-slide="next">›</a>
</div>