File: _head.rhtml

package info (click to toggle)
ruby3.4 3.4.9-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 152,040 kB
  • sloc: ruby: 1,262,509; ansic: 831,188; yacc: 28,233; pascal: 7,359; sh: 3,910; python: 1,799; cpp: 1,158; makefile: 827; asm: 808; javascript: 414; lisp: 109; perl: 62; awk: 36; xml: 4; sed: 4
file content (48 lines) | stat: -rw-r--r-- 2,136 bytes parent folder | download | duplicates (2)
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
<meta charset="<%= @options.charset %>">
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title><%= h @title %></title>

<%- if defined?(klass) -%>
  <meta name="keywords" content="ruby,<%= h "#{klass.type},#{klass.full_name}" %>">

  <%- if klass.comment.empty? -%>
    <meta name="description" content="Documentation for the <%= h "#{klass.full_name} #{klass.type}" %>">
  <%- else -%>
    <meta name="description" content="<%= h "#{klass.type} #{klass.full_name}: #{excerpt(klass.comment)}" %>">
  <%- end -%>
<%- elsif defined?(file) -%>
  <meta name="keywords" content="ruby,documentation,<%= h file.page_name %>">
  <meta name="description" content="<%= h "#{file.page_name}: #{excerpt(file.comment)}" %>">
<%- elsif @title -%>
  <meta name="keywords" content="ruby,documentation,<%= h @title %>">

  <%- if @options.main_page and
      main_page = @files.find { |f| f.full_name == @options.main_page } then %>
    <meta name="description" content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>">
  <%- else -%>
    <meta name="description" content="Documentation for <%= h @title %>">
  <%- end -%>
<%- end -%>

<%- if canonical_url = @options.canonical_root -%>
<% canonical_url = current.canonical_url if defined?(current) %>
<link rel="canonical" href="<%= canonical_url %>">
<%- end -%>

<script type="text/javascript">
  var rdoc_rel_prefix = "<%= h asset_rel_prefix %>/";
  var index_rel_prefix = "<%= h rel_prefix %>/";
</script>

<script src="<%= h asset_rel_prefix %>/js/navigation.js" defer></script>
<script src="<%= h asset_rel_prefix %>/js/search.js" defer></script>
<script src="<%= h asset_rel_prefix %>/js/search_index.js" defer></script>
<script src="<%= h asset_rel_prefix %>/js/searcher.js" defer></script>
<script src="<%= h asset_rel_prefix %>/js/darkfish.js" defer></script>

<link href="<%= h asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
<link href="<%= h asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
<%- @options.template_stylesheets.each do |stylesheet| -%>
<link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
<%- end -%>