|
4 | 4 | <title><%= h @title %></title> |
5 | 5 |
|
6 | 6 | <%- if defined?(klass) %> |
7 | | - <meta name="keywords" content="ruby,<%= h "#{klass.type},#{klass.full_name}" %>"> |
8 | | - |
| 7 | + <meta |
| 8 | + name="keywords" |
| 9 | + content="ruby,<%= h "#{klass.type},#{klass.full_name}" %>" |
| 10 | + > |
9 | 11 | <%- if klass.comment.empty? %> |
10 | | - <meta name="description" content="Documentation for the <%= h "#{klass.full_name} #{klass.type}" %>"> |
| 12 | + <meta |
| 13 | + name="description" |
| 14 | + content="Documentation for the <%= h "#{klass.full_name} #{klass.type}" %>" |
| 15 | + > |
11 | 16 | <%- else %> |
12 | | - <meta name="description" content="<%= h "#{klass.type} #{klass.full_name}: #{excerpt(klass.comment)}" %>"> |
| 17 | + <meta |
| 18 | + name="description" |
| 19 | + content="<%= h "#{klass.type} #{klass.full_name}: #{excerpt(klass.comment)}" %>" |
| 20 | + > |
13 | 21 | <%- end %> |
14 | 22 | <%- elsif defined?(file) %> |
15 | 23 | <meta name="keywords" content="ruby,documentation,<%= h file.page_name %>"> |
16 | | - <meta name="description" content="<%= h "#{file.page_name}: #{excerpt(file.comment)}" %>"> |
| 24 | + <meta |
| 25 | + name="description" |
| 26 | + content="<%= h "#{file.page_name}: #{excerpt(file.comment)}" %>" |
| 27 | + > |
17 | 28 | <%- elsif @title %> |
18 | 29 | <meta name="keywords" content="ruby,documentation,<%= h @title %>"> |
19 | | - |
20 | 30 | <%- if @options.main_page and |
21 | 31 | main_page = @files.find { |f| f.full_name == @options.main_page } then %> |
22 | | - <meta name="description" content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>"> |
| 32 | + <meta |
| 33 | + name="description" |
| 34 | + content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>" |
| 35 | + > |
23 | 36 | <%- else %> |
24 | 37 | <meta name="description" content="Documentation for <%= h @title %>"> |
25 | 38 | <%- end %> |
26 | 39 | <%- end %> |
27 | 40 |
|
28 | 41 | <%- if canonical_url = @options.canonical_root %> |
29 | | -<% canonical_url = current.canonical_url if defined?(current) %> |
30 | | -<link rel="canonical" href="<%= canonical_url %>"> |
| 42 | + <% canonical_url = current.canonical_url if defined?(current) %> |
| 43 | + <link rel="canonical" href="<%= canonical_url %>"> |
31 | 44 | <%- end %> |
32 | 45 |
|
33 | 46 | <!-- Open Graph / Facebook --> |
34 | 47 | <meta property="og:type" content="website"> |
35 | 48 | <meta property="og:title" content="<%= h @title %>"> |
| 49 | + |
36 | 50 | <%- if defined?(klass) %> |
37 | 51 | <%- if klass.comment.empty? %> |
38 | | - <meta property="og:description" content="Documentation for <%= h klass.full_name %> <%= h klass.type %> - API reference and code examples"> |
| 52 | + <meta |
| 53 | + property="og:description" |
| 54 | + content="Documentation for <%= h klass.full_name %> <%= h klass.type %> - API reference and code examples" |
| 55 | + > |
39 | 56 | <%- else %> |
40 | 57 | <meta property="og:description" content="<%= h excerpt(klass.comment) %>"> |
41 | 58 | <%- end %> |
42 | 59 | <%- elsif defined?(file) %> |
43 | 60 | <%- if file.comment.empty? %> |
44 | | - <meta property="og:description" content="<%= h file.page_name %> - <%= h @title %> documentation"> |
| 61 | + <meta |
| 62 | + property="og:description" |
| 63 | + content="<%= h file.page_name %> - <%= h @title %> documentation" |
| 64 | + > |
45 | 65 | <%- else %> |
46 | 66 | <meta property="og:description" content="<%= h excerpt(file.comment) %>"> |
47 | 67 | <%- end %> |
48 | 68 | <%- else %> |
49 | | - <meta property="og:description" content="API documentation for <%= h @title %> - Browse classes, modules, and methods"> |
| 69 | + <meta |
| 70 | + property="og:description" |
| 71 | + content="API documentation for <%= h @title %> - Browse classes, modules, and methods" |
| 72 | + > |
50 | 73 | <%- end %> |
| 74 | + |
51 | 75 | <%- if canonical_url = @options.canonical_root %> |
52 | | -<% canonical_url = current.canonical_url if defined?(current) %> |
53 | | -<meta property="og:url" content="<%= canonical_url %>"> |
| 76 | + <% canonical_url = current.canonical_url if defined?(current) %> |
| 77 | + <meta property="og:url" content="<%= canonical_url %>"> |
54 | 78 | <%- end %> |
55 | 79 |
|
56 | 80 | <!-- Twitter --> |
57 | 81 | <meta name="twitter:card" content="summary"> |
58 | 82 | <meta name="twitter:title" content="<%= h @title %>"> |
| 83 | + |
59 | 84 | <%- if defined?(klass) %> |
60 | 85 | <%- if klass.comment.empty? %> |
61 | | - <meta name="twitter:description" content="Documentation for <%= h klass.full_name %> <%= h klass.type %> - API reference and code examples"> |
| 86 | + <meta |
| 87 | + name="twitter:description" |
| 88 | + content="Documentation for <%= h klass.full_name %> <%= h klass.type %> - API reference and code examples" |
| 89 | + > |
62 | 90 | <%- else %> |
63 | 91 | <meta name="twitter:description" content="<%= h excerpt(klass.comment) %>"> |
64 | 92 | <%- end %> |
65 | 93 | <%- elsif defined?(file) %> |
66 | 94 | <%- if file.comment.empty? %> |
67 | | - <meta name="twitter:description" content="<%= h file.page_name %> - <%= h @title %> documentation"> |
| 95 | + <meta |
| 96 | + name="twitter:description" |
| 97 | + content="<%= h file.page_name %> - <%= h @title %> documentation" |
| 98 | + > |
68 | 99 | <%- else %> |
69 | 100 | <meta name="twitter:description" content="<%= h excerpt(file.comment) %>"> |
70 | 101 | <%- end %> |
71 | 102 | <%- else %> |
72 | | - <meta name="twitter:description" content="API documentation for <%= h @title %> - Browse classes, modules, and methods"> |
| 103 | + <meta |
| 104 | + name="twitter:description" |
| 105 | + content="API documentation for <%= h @title %> - Browse classes, modules, and methods" |
| 106 | + > |
73 | 107 | <%- end %> |
74 | 108 |
|
75 | 109 | <script type="text/javascript"> |
76 | 110 | var rdoc_rel_prefix = "<%= h asset_rel_prefix %>/"; |
77 | 111 | var index_rel_prefix = "<%= h rel_prefix %>/"; |
78 | 112 | </script> |
79 | 113 |
|
80 | | -<script src="<%= h asset_rel_prefix %>/js/theme-toggle.js"></script> |
81 | | -<script src="<%= h asset_rel_prefix %>/js/navigation.js" defer></script> |
82 | | -<script src="<%= h asset_rel_prefix %>/js/search.js" defer></script> |
83 | | -<script src="<%= h asset_rel_prefix %>/js/search_index.js" defer></script> |
84 | | -<script src="<%= h asset_rel_prefix %>/js/searcher.js" defer></script> |
85 | | -<script src="<%= h asset_rel_prefix %>/js/c_highlighter.js" defer></script> |
86 | | -<script src="<%= h asset_rel_prefix %>/js/aliki.js" defer></script> |
| 114 | +<script |
| 115 | + src="<%= h asset_rel_prefix %>/js/theme-toggle.js?v=<%= h RDoc::VERSION %>" |
| 116 | +></script> |
| 117 | + |
| 118 | +<script |
| 119 | + src="<%= h asset_rel_prefix %>/js/navigation.js?v=<%= h RDoc::VERSION %>" |
| 120 | + defer |
| 121 | +></script> |
| 122 | + |
| 123 | +<script |
| 124 | + src="<%= h asset_rel_prefix %>/js/search.js?v=<%= h RDoc::VERSION %>" |
| 125 | + defer |
| 126 | +></script> |
| 127 | + |
| 128 | +<script |
| 129 | + src="<%= h asset_rel_prefix %>/js/search_index.js?v=<%= h RDoc::VERSION %>" |
| 130 | + defer |
| 131 | +></script> |
| 132 | + |
| 133 | +<script |
| 134 | + src="<%= h asset_rel_prefix %>/js/searcher.js?v=<%= h RDoc::VERSION %>" |
| 135 | + defer |
| 136 | +></script> |
| 137 | + |
| 138 | +<script |
| 139 | + src="<%= h asset_rel_prefix %>/js/c_highlighter.js?v=<%= h RDoc::VERSION %>" |
| 140 | + defer |
| 141 | +></script> |
| 142 | + |
| 143 | +<script |
| 144 | + src="<%= h asset_rel_prefix %>/js/aliki.js?v=<%= h RDoc::VERSION %>" |
| 145 | + defer |
| 146 | +></script> |
| 147 | + |
| 148 | +<link |
| 149 | + href="<%= h asset_rel_prefix %>/css/rdoc.css?v=<%= h RDoc::VERSION %>" |
| 150 | + rel="stylesheet" |
| 151 | +> |
87 | 152 |
|
88 | | -<link href="<%= h asset_rel_prefix %>/css/rdoc.css" rel="stylesheet"> |
89 | 153 | <%- @options.template_stylesheets.each do |stylesheet| %> |
90 | | -<link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet"> |
| 154 | + <link |
| 155 | + href="<%= h asset_rel_prefix %>/<%= h File.basename stylesheet %>?v=<%= h RDoc::VERSION %>" |
| 156 | + rel="stylesheet" |
| 157 | + > |
91 | 158 | <%- end %> |
0 commit comments