-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdoc_template.html.haml
70 lines (53 loc) · 1.05 KB
/
doc_template.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
layout: default
---
.page-header
%h1= page.name
%small
%h2= page.classname
= page.description
%h2 Usage
= page.usage
%h2 Parameters
- if ( page.params.nil? || page.params.empty? )
%em
None
- else
%pre
:preserve
#{page.classname}.new(#{page.params.join(', ')})
%table.parameters
%tr
%th Parameter
%th Description
- page.params.each do |param|
%tr
%td
%code= param
%td
= page.param_descriptions[ param ]
- unless ( page.opts.nil? || page.opts.empty? )
.options
%h3 Options
%table
- page.opts.keys.sort.each do |key|
%tr
%th
= key
%td
= page.opts[ key ]
%h2 Examples
%h3 Generic Installation
%pre
%code.ruby
:preserve
Awestruct::Extensions::Pipeline.new do
extension #{page.classname}.new(#{(page.params||[]).join( ', ' ) })
end
= page.example
- unless page.see_also.nil?
%h2 See Also
%ul
- page.see_also.each do |e|
%li
%a{:href=>e.url}=e.name