Skip to content

Commit ca9ebc2

Browse files
Antora (#1263)
* Migrate Structure * Insert explicit ids for headers * Remove unnecessary asciidoc attributes * Copy default antora files * Fix indentation for all pages * Split files * Generate a default navigation * Remove includes * Fix cross references * Enable Section Summary TOC for small pages * It's alive * Fixed readme
1 parent 5191950 commit ca9ebc2

27 files changed

+1664
-2281
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy Docs
2+
on:
3+
push:
4+
branches-ignore: [ gh-pages ]
5+
tags: '**'
6+
repository_dispatch:
7+
types: request-build-reference # legacy
8+
#schedule:
9+
#- cron: '0 10 * * *' # Once per day at 10am UTC
10+
workflow_dispatch:
11+
permissions:
12+
actions: write
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
# FIXME: enable when pushed to spring-projects
17+
# if: github.repository_owner == 'spring-projects'
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
ref: docs-build
23+
fetch-depth: 1
24+
- name: Dispatch (partial build)
25+
if: github.ref_type == 'branch'
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
29+
- name: Dispatch (full build)
30+
if: github.ref_type == 'tag'
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ _site/
2121
antrun
2222
.vscode/
2323
.flattened-pom.xml
24+
node
25+
node_modules
26+
build
27+
_configprops.adoc
28+
_spans.adoc
29+
_metrics.adoc
30+
_conventions.adoc
31+
package.json
32+
package-lock.json

README.adoc

Lines changed: 8 additions & 328 deletions
Large diffs are not rendered by default.

docs/antora-playbook.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
antora:
2+
extensions:
3+
- '@springio/antora-extensions/partial-build-extension'
4+
- require: '@springio/antora-extensions/latest-version-extension'
5+
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
6+
- '@antora/collector-extension'
7+
- '@antora/atlas-extension'
8+
- require: '@springio/antora-extensions/root-component-extension'
9+
root_component_name: 'cloud-commons'
10+
site:
11+
title: Spring Cloud Commons
12+
url: https://docs.spring.io/spring-cloud-commons/reference/
13+
content:
14+
sources:
15+
- url: ./..
16+
branches: HEAD
17+
start_path: docs
18+
worktrees: true
19+
asciidoc:
20+
attributes:
21+
page-stackoverflow-url: https://stackoverflow.com/tags/spring-cloud
22+
page-pagination: ''
23+
hide-uri-scheme: '@'
24+
tabs-sync-option: '@'
25+
chomp: 'all'
26+
extensions:
27+
- '@asciidoctor/tabs'
28+
- '@springio/asciidoctor-extensions'
29+
sourcemap: true
30+
urls:
31+
latest_version_segment: ''
32+
runtime:
33+
log:
34+
failure_level: warn
35+
format: pretty
36+
ui:
37+
bundle:
38+
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.4/ui-bundle.zip

docs/antora.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: cloud-commons
2+
version: true
3+
title: Spring Cloud Commons
4+
nav:
5+
- modules/ROOT/nav.adoc
6+
ext:
7+
collector:
8+
run:
9+
command: ./mvnw validate process-resources -Pdocs -pl docs
10+
local: true
11+
scan:
12+
dir: ./target/classes/antora-resources/

docs/modules/ROOT/nav.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* xref:index.adoc[]
2+
** xref:intro.adoc[]
3+
** xref:spring-cloud-commons/application-context-services.adoc[]
4+
** xref:spring-cloud-commons/common-abstractions.adoc[]
5+
** xref:spring-cloud-commons/loadbalancer.adoc[]
6+
** xref:spring-cloud-commons/cachedrandompropertysource.adoc[]
7+
** xref:spring-cloud-commons/security.adoc[]
8+
* xref:spring-cloud-circuitbreaker.adoc[]
9+
* xref:appendix.adoc[]
10+
** xref:configprops.adoc[]
11+
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
:numbered!:
21
[appendix]
32
[[common-application-properties]]
4-
== Common application properties
3+
= Common application properties
54

6-
include::_attributes.adoc[]
5+
include::partial$_attributes.adoc[]
76

87
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
98
This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them.
109

1110
NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
1211
Also, you can define your own properties.
1312

14-
include::_configprops.adoc[]
13+
[[observability]]
14+
== Observability metadata
1515

16-
include::_observability.adoc[]
16+
include::partial$_metrics.adoc[]
17+
18+
include::partial$_spans.adoc[]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[[configuration-properties]]
2+
= Configuration Properties
3+
4+
Below you can find a list of configuration properties.
5+
6+
include::partial$_configprops.adoc[]

docs/modules/ROOT/pages/index.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[[cloud-native-applications]]
2+
= Cloud Native Applications
3+
4+
include::partial$_attributes.adoc[]
5+
6+
// TODO: figure out remote includes in docs and replace pasted text
7+
// include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing-docs.adoc[]
8+
NOTE: Spring Cloud is released under the non-restrictive Apache 2.0 license.
9+
If you would like to contribute to this section of the documentation or if you find an error, you can find the source code and issue trackers for the project at {github-issues}[github].
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[[introduction]]
2+
= Introduction
13

24
https://pivotal.io/platform-as-a-service/migrating-to-cloud-native-application-architectures-ebook[Cloud Native] is a style of application development that encourages easy adoption of best practices in the areas of continuous delivery and value-driven development.
35
A related discipline is that of building https://12factor.net/[12-factor Applications], in which development practices are aligned with delivery and operations goals -- for instance, by using declarative programming and management and monitoring.
@@ -7,4 +9,3 @@ Spring Cloud facilitates these styles of development in a number of specific way
79
Many of those features are covered by https://projects.spring.io/spring-boot[Spring Boot], on which Spring Cloud builds. Some more features are delivered by Spring Cloud as two libraries: Spring Cloud Context and Spring Cloud Commons.
810
Spring Cloud Context provides utilities and special services for the `ApplicationContext` of a Spring Cloud application (bootstrap context, encryption, refresh scope, and environment endpoints). Spring Cloud Commons is a set of abstractions and common classes used in different Spring Cloud implementations (such as Spring Cloud Netflix and Spring Cloud Consul).
911

10-
include::jce.adoc[]

0 commit comments

Comments
 (0)