@@ -20,32 +20,36 @@ Create your own templates (use `headers`, `slides`, `name`, etc.)
20
20
21
21
## Headers {#headers}
22
22
23
- Use ` @ headers` to reference headers (such as title, author, etc.) from your slide source
23
+ Use ` headers ` to reference headers (such as title, author, etc.) from your slide source
24
24
(or from your ` slideshow.yml ` configuration) in your templates.
25
25
26
26
Example:
27
27
28
- ~~~
29
- <meta name="author" content="<%= @headers['author']%>">
28
+ ```
29
+ {% raw %}
30
+ <meta name="author" content="{{ headers['author'] }}">
30
31
31
- <title><%= @headers['title'] %> | by <%= @headers['author']%></title>
32
- ~~~
32
+ <title>{{ headers['title'] }} | by {{ headers['author'] }}</title>
33
+ {% endraw %}
34
+ ```
33
35
34
36
Example 2:
35
37
36
- ~~~
38
+ ```
39
+ {% raw %}
37
40
<div class='slide'>
38
- <h1><%= @ headers['title'] %> </h1>
39
- <h2><%= @ headers['subtitle'] %> </h2>
40
- <h3><%= @ headers['author']%> </h3>
41
- <h4><%= @ headers['company']%> </h4>
41
+ <h1>{{ headers['title'] }} </h1>
42
+ <h2>{{ headers['subtitle'] }} </h2>
43
+ <h3>{{ headers['author'] }} </h3>
44
+ <h4>{{ headers['company'] }} </h4>
42
45
</div>
43
- ~~~
46
+ {% endraw %}
47
+ ```
44
48
45
49
46
50
## Slides {#slides}
47
51
48
- Use ` @ slides` to reference your slides. A ` slide ` includes the following fields:
52
+ Use ` slides ` to reference your slides. A ` slide ` includes the following fields:
49
53
50
54
* ` content `
51
55
* ` header ` => Optional Header
@@ -55,37 +59,43 @@ Use `@slides` to reference your slides. A `slide` includes the following fields:
55
59
56
60
Example:
57
61
58
- ~~~
59
- <% @slides.each do |slide| %>
62
+ ```
63
+ {% raw %}
64
+ {% for slide in slides %}
60
65
<div class='slide'>
61
- <%= slide.content %>
66
+ {{ slide.content }}
62
67
</div>
63
- <% end %>
64
- ~~~
68
+ {% endfor %}
69
+ {% endraw %}
70
+ ```
65
71
66
72
Example 2:
67
73
68
- ~~~
69
- <% @slides.each do |slide| %>
70
- <div class='slide <%= slide.classes %>'>
71
- <header><%= slide.header %></header>
74
+ ```
75
+ {% raw %}
76
+ {% for slide in slides %}
77
+ <div class='slide {{ slide.classes }}'>
78
+ <header>{{ slide.header }}</header>
72
79
<section>
73
- <%= slide.content_without_header %>
80
+ {{ slide.content_without_header }}
74
81
</section>
75
82
</div>
76
- <% end %>
77
- ~~~
83
+ {% endfor %}
84
+ {% endraw %}
85
+ ```
78
86
79
87
80
88
## Filename {#filename}
81
89
82
- Use ` @ name` to reference the basename of the passed in file e.g. ` microformats.text ` becomes ` microformats ` .
90
+ Use ` name ` to reference the basename of the passed in file e.g. ` microformats.text ` becomes ` microformats ` .
83
91
84
92
Example:
85
93
86
- ~~~
87
- <link rel="stylesheet" href="<%= "#{@name}.css" %>">
88
- ~~~
94
+ ```
95
+ {% raw %}
96
+ <link rel="stylesheet" href="{{name}}.css">
97
+ {% endraw %}
98
+ ```
89
99
90
100
91
101
{% include questions.md %}
0 commit comments