Update docs to use new Spring style sheets.
This commit is contained in:
@@ -29,17 +29,66 @@ description = "Spring CredHub Documentation"
|
||||
|
||||
apply plugin: 'org.asciidoctor.convert'
|
||||
|
||||
repositories {
|
||||
maven { url "https://repo.spring.io/libs-snapshot-local" }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations {
|
||||
docs
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(":spring-credhub-core")
|
||||
compile("io.projectreactor:reactor-core")
|
||||
|
||||
docs("io.spring.docresources:spring-doc-resources:0.1.1.BUILD-SNAPSHOT@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('src/docs/asciidoc')
|
||||
attributes 'revnumber': project.version,
|
||||
sourceDir = file("$buildDir/asciidoc")
|
||||
sources {
|
||||
include '*.adoc'
|
||||
}
|
||||
resources {
|
||||
from(sourceDir) {
|
||||
include 'images/*', 'css/**', 'js/**'
|
||||
}
|
||||
}
|
||||
logDocuments = true
|
||||
backends = ["html5"]
|
||||
options doctype: 'book', eruby: 'erubis'
|
||||
attributes 'icons': 'font',
|
||||
'idprefix': '',
|
||||
'idseparator': '-',
|
||||
docinfo: 'shared',
|
||||
revnumber: project.version,
|
||||
'spring-version': project.version,
|
||||
'branch-or-tag': project.version.endsWith('SNAPSHOT') ? 'master' : "v${project.version}",
|
||||
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
|
||||
|
||||
configurations.archives.artifacts.clear()
|
||||
|
||||
@@ -16,7 +16,7 @@ To use mutual TLS authentication to a CredHub server, simply provide the URL of
|
||||
|
||||
[source,properties,%autofit]
|
||||
----
|
||||
include::{examples-dir}/config-minimal.yml[]
|
||||
include::{examples-dir}config-minimal.yml[]
|
||||
----
|
||||
|
||||
See the {credhub-api-mtls}[CredHub documentation] for more information on mutual TLS authentication.
|
||||
@@ -30,7 +30,7 @@ Spring CredHub supports client credentials grant tokens for authentication using
|
||||
|
||||
[source,properties,%autofit]
|
||||
----
|
||||
include::{examples-dir}/config-oauth2.yml[]
|
||||
include::{examples-dir}config-oauth2.yml[]
|
||||
----
|
||||
|
||||
The ID provided in `spring.credhub.oauth2.registration-id` must refer to a client configured under `spring.security.oauth2.client.registration`.
|
||||
|
||||
@@ -8,7 +8,7 @@ Scott Frederick;
|
||||
:toclevels: 3
|
||||
:sectlinks:
|
||||
|
||||
:examples-dir: ../../test/java/com/example/credhub/
|
||||
:examples-dir: ../../src/test/java/com/example/credhub/
|
||||
:credhub-home: https://docs.cloudfoundry.org/credhub/
|
||||
:credhub-api-home: https://credhub-api.cfapps.io/
|
||||
:credhub-api-credentials: {credhub-api-home}version/2.0/#credentials
|
||||
|
||||
@@ -65,5 +65,5 @@ Application classes can autowire an instance of this bean to interact with a Cre
|
||||
|
||||
[source,java,%autofit]
|
||||
----
|
||||
include::{examples-dir}/CredHubService.java[]
|
||||
include::{examples-dir}CredHubService.java[]
|
||||
----
|
||||
|
||||
@@ -65,5 +65,5 @@ Application classes can autowire an instance of this bean to interact with a Cre
|
||||
|
||||
[source,java,%autofit]
|
||||
----
|
||||
include::{examples-dir}/ReactiveCredHubService.java[]
|
||||
include::{examples-dir}ReactiveCredHubService.java[]
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user