diff --git a/docs/src/main/ruby/generate_readme.sh b/docs/src/main/ruby/generate_readme.sh index 64c6052c..7d624a7c 100755 --- a/docs/src/main/ruby/generate_readme.sh +++ b/docs/src/main/ruby/generate_readme.sh @@ -17,7 +17,10 @@ end file = ARGV[0] if ARGV.length>0 # Copied from https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/scripts/asciidoc-coalescer.rb -doc = Asciidoctor.load_file file, safe: :unsafe, header_only: true, attributes: options[:attributes] +attributes = {} +attributes['project-root'] = File.expand_path("#{base_dir}/../") + +doc = Asciidoctor.load_file file, safe: :unsafe, header_only: true, attributes: attributes header_attr_names = (doc.instance_variable_get :@attributes_modified).to_a header_attr_names.each {|k| doc.attributes[%(#{k}!)] = '' unless doc.attr? k } attrs = doc.attributes