From 7fa4ac1cf809f641af2903efd577f9298d5ce83e Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Mon, 23 Mar 2015 17:27:23 +0100 Subject: [PATCH] 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. --- build.gradle | 3 ++- src/asciidoc/Guardfile | 4 ++-- src/asciidoc/index.adoc | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index d408fb1de8..f7c02dd0fe 100644 --- a/build.gradle +++ b/build.gradle @@ -1118,7 +1118,8 @@ configure(rootProject) { separateOutputDirs = false backends = ['docbook'] 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, docinfo : "" } diff --git a/src/asciidoc/Guardfile b/src/asciidoc/Guardfile index 58359927e2..cd619bbdf1 100644 --- a/src/asciidoc/Guardfile +++ b/src/asciidoc/Guardfile @@ -8,9 +8,9 @@ FileUtils.cp_r('images','build') guard 'shell' do watch(/^.*\.adoc$/) {|m| 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 - 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 diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index d28f6ebe5b..7952922047 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -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 -:javadoc-baseurl: http://docs.spring.io/spring/docs/current/javadoc-api - - include::overview.adoc[] include::whats-new.adoc[]