Move to new Spring docs style

This commit is contained in:
Ben Klein
2020-01-30 18:10:51 -06:00
committed by Roy Clarkson
parent f04ac8d380
commit 4a985e5adb

View File

@@ -20,6 +20,14 @@ plugins {
description = "Spring Cloud App Broker Documentation"
repositories {
mavenCentral()
}
configurations {
docs
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
@@ -34,12 +42,52 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-tomcat")
implementation("io.projectreactor:reactor-core")
docs("io.spring.docresources:spring-doc-resources:0.1.0.RELEASE@zip")
}
task prepareAsciidocBuild(type: Sync) {
dependsOn configurations.docs
// copy doc resources
from {
configurations.docs.collect { zipTree(it) }
}
// and doc sources
from "src/docs/asciidoc"
// to a temporary build directory
into "$buildDir/asciidoc"
}
asciidoctor {
sourceDir = file("$buildDir/asciidoc")
sources {
include '*.adoc'
}
resources {
from(sourceDir) {
include 'images/*', 'css/**', 'js/**'
}
}
logDocuments = true
backends = ["html5"]
options doctype: 'book', eruby: 'erubis'
attributes 'revnumber': project.version,
'spring-version': project.version,
'branch-or-tag': project.version.endsWith('SNAPSHOT') ? 'master' : "v${project.version}",
'icons': 'font',
'idprefix': '',
'idseparator': '-',
docinfo: 'shared',
sectanchors: '',
sectnums: '',
stylesdir: "css/",
stylesheet: 'spring.css',
'linkcss': true,
'nofooter': true,
'allow-uri-read': ''
'allow-uri-read': '',
'source-highlighter=highlight.js',
'highlightjsdir=js/highlight',
'highlightjs-theme=atom-one-dark-reasonable'
}
asciidoctor.dependsOn prepareAsciidocBuild