Skip to content

Commit 38fcfb1

Browse files
author
ben
committed
added output messages to wiki static file initializer
1 parent 5507b61 commit 38fcfb1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/generate_static_files.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
marker_footer = '<!-- /#End_Content_Marker - DO NOT (RE)MOVE! -->'
33

44
begin
5-
html = File.open(Rails.root + '../index.html', 'r') { |f| f.read }
5+
puts "Try to generate static files for wiki..."
6+
html = File.open(Rails.root + '../index.html', 'r') { |f| f.read }
67

78
doc = Nokogiri::HTML(html[0,html.index(marker_header)])
89

@@ -24,6 +25,7 @@
2425
write_to.puts(header[0,header.length-16]) #extreme ugly because nokogiri add </body></html> at the end of its document
2526

2627
write_to = File.new(Rails.root + "app/views/layouts/footer.html", "w+")
28+
2729
write_to.puts(html[html.index(marker_footer)+marker_footer.length,html.length])
2830

2931
#copy fresh static files from the frontend on every startup only on dev mode
@@ -36,7 +38,7 @@
3638
%x[cp -R ../images public/]
3739
%x[touch public/images/.images_go_here]
3840
end
39-
41+
puts "...finished!"
4042
rescue Exception => e
4143
puts "Can't generate static HTML Header and Footer! Do nothing!"
4244
puts "ERROR: #{e}"

0 commit comments

Comments
 (0)