Externalize javadoc-baseurl asciidoctor attribute

The `javadoc-baseurl` asciidoctor attribute is now externalized
(i.e. not included directly in the document anymore).

This allows to properly render javadoc links in single pages, whereas
those URLs were previoulsy only supported in the single page version.
master
Brian Clozel 10 years ago
parent f9ce11eef8
commit 7fa4ac1cf8
  1. 3
      build.gradle
  2. 4
      src/asciidoc/Guardfile
  3. 3
      src/asciidoc/index.adoc

@ -1118,7 +1118,8 @@ configure(rootProject) {
separateOutputDirs = false separateOutputDirs = false
backends = ['docbook'] backends = ['docbook']
options doctype: 'book', eruby: 'erubis' options doctype: 'book', eruby: 'erubis'
attributes 'spring-version': project.version, attributes 'spring-version': project.version,
'javadoc-baseurl' : "http://docs.spring.io/spring/docs/current/javadoc-api",
revnumber : project.version, revnumber : project.version,
docinfo : "" docinfo : ""
} }

@ -8,9 +8,9 @@ FileUtils.cp_r('images','build')
guard 'shell' do guard 'shell' do
watch(/^.*\.adoc$/) {|m| watch(/^.*\.adoc$/) {|m|
if m[0] != "index.adoc" if m[0] != "index.adoc"
Asciidoctor.render_file(m[0], :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '2', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT' }) Asciidoctor.render_file(m[0], :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '2', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT', 'javadoc-baseurl' => "http://docs.spring.io/spring/docs/current/javadoc-api" })
end end
Asciidoctor.render_file("index.adoc", :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '1', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT' }) Asciidoctor.render_file("index.adoc", :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '1', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT', 'javadoc-baseurl' => "http://docs.spring.io/spring/docs/current/javadoc-api" })
} }
end end

@ -2,9 +2,6 @@
Rod Johnson; Juergen Hoeller; Keith Donald; Colin Sampaleanu; Rob Harrop; Thomas Risberg; Alef Arendsen; Darren Davison; Dmitriy Kopylenko; Mark Pollack; Thierry Templier; Erwin Vervaet; Portia Tung; Ben Hale; Adrian Colyer; John Lewis; Costin Leau; Mark Fisher; Sam Brannen; Ramnivas Laddad; Arjen Poutsma; Chris Beams; Tareq Abedrabbo; Andy Clement; Dave Syer; Oliver Gierke; Rossen Stoyanchev; Phillip Webb; Rob Winch; Brian Clozel; Stephane Nicoll; Sebastien Deleuze Rod Johnson; Juergen Hoeller; Keith Donald; Colin Sampaleanu; Rob Harrop; Thomas Risberg; Alef Arendsen; Darren Davison; Dmitriy Kopylenko; Mark Pollack; Thierry Templier; Erwin Vervaet; Portia Tung; Ben Hale; Adrian Colyer; John Lewis; Costin Leau; Mark Fisher; Sam Brannen; Ramnivas Laddad; Arjen Poutsma; Chris Beams; Tareq Abedrabbo; Andy Clement; Dave Syer; Oliver Gierke; Rossen Stoyanchev; Phillip Webb; Rob Winch; Brian Clozel; Stephane Nicoll; Sebastien Deleuze
:javadoc-baseurl: http://docs.spring.io/spring/docs/current/javadoc-api
include::overview.adoc[] include::overview.adoc[]
include::whats-new.adoc[] include::whats-new.adoc[]

Loading…
Cancel
Save