# Root directory for all repo html mini-sites. def my_output_dir return "#{ENV['HOME']}/wiki/ratf/src/repos" end # Common header for all pages def my_header(vals) rrp = vals[:root_rel_prefix] name = vals[:name] # page title starting with default for :main title = "#{name} - #{vals[:description]}" if vals[:page_type] == :file title = "#{name}/#{vals[:file_fname]}" elsif vals[:page_type] == :files_list title = "#{name} files" elsif vals[:page_type] == :commits title = "#{name} commit history" end og_img = "#{name}.jpg" og_img_local = "#{my_output_dir}/og_imgs/#{og_img}" og_img_url = "http://ratfactor.com/repos/og_imgs/#{og_img}" og_img_tag = '' if File.exist?(og_img_local) og_img_tag = "" end # Return header html as string <<~HTML