@@ -67,6 +67,7 @@ module PrototypeHelper
67
67
def self . build_doc_for ( file )
68
68
rm_rf ( DOC_DIR )
69
69
mkdir_p ( DOC_DIR )
70
+ hash = current_head
70
71
index_header = <<EOF
71
72
<h1 style="margin-top: 31px; height: 75px; padding: 1px 0; background: url(images/header-stripe-small.png) repeat-x;">
72
73
<a href="http://prototypejs.org" style="padding-left: 120px;">
@@ -76,15 +77,16 @@ module PrototypeHelper
76
77
EOF
77
78
PDoc . run ( {
78
79
:source_files => Dir [ File . join ( 'src' , '**' , '*.js' ) ] ,
79
- :destination => DOC_DIR ,
80
- :index_page => 'README.markdown' ,
80
+ :destination => DOC_DIR ,
81
+ :index_page => 'README.markdown' ,
81
82
:syntax_highlighter => syntax_highlighter ,
82
- :markdown_parser => :bluecloth ,
83
+ :markdown_parser => :bluecloth ,
84
+ :src_code_text => "View source on GitHub →" ,
83
85
:src_code_href => proc { |obj |
84
- "http ://github.com/sstephenson/prototype/blob/#{ hash } /#{ obj . file } #LID #{ obj . line_number } "
86
+ "https ://github.com/sstephenson/prototype/blob/#{ hash } /#{ obj . file } #L #{ obj . line_number } "
85
87
} ,
86
88
:pretty_urls => false ,
87
- :bust_cache => false ,
89
+ :bust_cache => false ,
88
90
:name => 'Prototype JavaScript Framework' ,
89
91
:short_name => 'Prototype' ,
90
92
:home_url => 'http://prototypejs.org' ,
0 commit comments