Split headline from title
d33f651ff79e63e30fb8ffd6306f26ca9d55c340
1 parent
12298216
build
+5 -0
| 64 | 64 | end |
|
| 65 | 65 | ||
| 66 | 66 | @date = attrs[:date] |
|
| 67 | 67 | @title = attrs[:title] |
|
| 68 | 68 | @teaser = attrs[:teaser] |
|
| 69 | + | @headline = attrs[:headline] |
|
| 70 | + | end |
|
| 71 | + | ||
| 72 | + | def method_missing(m, *args) |
|
| 73 | + | self.instance_variable_get("@#{m}") |
|
| 69 | 74 | end |
|
| 70 | 75 | end |
|
| 71 | 76 | ||
| 72 | 77 | def build!(base, out) |
|
| 73 | 78 | base = Pathname::new(base) |
page.html.erb
+2 -2
| 31 | 31 | © <%= year %> Alexis Sellier |
|
| 32 | 32 | </footer> |
|
| 33 | 33 | </nav> |
|
| 34 | 34 | <% if body %> |
|
| 35 | 35 | <article class="note"> |
|
| 36 | - | <% if title %> |
|
| 36 | + | <% if headline %> |
|
| 37 | 37 | <header> |
|
| 38 | - | <h1><%= title %></h1> |
|
| 38 | + | <h1><%= headline %></h1> |
|
| 39 | 39 | <% if date -%> |
|
| 40 | 40 | <p class="date"><%= date %></p> |
|
| 41 | 41 | <% end %> |
|
| 42 | 42 | </header> |
|
| 43 | 43 | <% end %> |