Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
require 'asciidoctor'
require 'erb'
require 'haml'
require 'tilt'

guard 'shell' do
watch(/^.*\.adoc$/) { |m|
if not m[0].start_with?('_preview')
src_group_path = m[0].split('/')[0]
filename = m[0].split('/')[-1][0..-6]
tgt_file_path = "_preview/#{src_group_path}"
Asciidoctor.render_file m[0], :in_place => true, :safe => :unsafe, :template_dir => '_template', :attributes => ['source-highlighter=coderay','coderay-css=style',"stylesdir=_preview/stylesheets","imagesdir=#{src_group_path}/images",'stylesheet=origin.css','linkcss!','icons=font','idprefix=','idseparator=-','sectanchors']
system('mv', "#{src_group_path}/#{filename}.html", "#{tgt_file_path}/")
system("bundle exec rake refresh_page['#{src_group_path}:#{filename}']")
end
}
end

guard 'livereload' do
watch(%r{^_preview\.(css|js|html)$})
watch(%r{^_preview/.+\.(css|js|html)$})
watch(%r{^_preview/.+\/.+\/.+\.(css|js|html)$})
end
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= OpenShift Documentation
= OpenShift Documentation (ONLINE BRANCH)

This repo contains the documentation for

Expand Down
Loading