-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate reference documentation to Antora #3806
Conversation
…tures are now split in multiple adoc files.
acec348
to
2dc0570
Compare
the previous force-push commit contains a fix in the GH action publish.yml, in order to build the docs-zip using a separate build-docs-zip job that is using JDK21. It allows the other deploy jobs (deployRelease/deploySnapshot/deployMilistone) to download it and include it in the published artifacts, but still using JDK8 as the default JDK. |
…avadoc. Added a warn when docsZip is not found.
in the last commit 20f7d80, added docs/build/** in the nohttp section from the main build.gradle, else the "./gradlew checkstyleNohttp" fails. |
Thanks for the updates. I'll check the generated docs now. First thing that happened was me running with JDK8:
I believe it should fail saying that JDK17+ is required instead. |
Running
I get
I think it should also fail with a message explaining JDK17+ is required. |
Keep in mind that projectreactor.io has a link to a specific section as "Choosing an Operator" that points to |
This care should also be applied for the testing module that has a link on the site. |
TIP: To facilitate documentation edits, you can edit the current page from the `Edit this Page` link located in the upper right corner sidebar. The link opens | ||
an edit `UI` directly on `GitHub` for the main source file for the current page. These links are | ||
only present in the `HTML5` version of this reference guide. They look like the following link: | ||
link:https://github.com/reactor/reactor-core/edit/main/docs/modules/ROOT/pages/aboutDoc.adoc[Edit this Page^, role="fa fa-edit"] to xref:aboutDoc.adoc[About the Documentation]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link:https://github.com/reactor/reactor-core/edit/main/docs/modules/ROOT/pages/aboutDoc.adoc[Edit this Page^, role="fa fa-edit"] to xref:aboutDoc.adoc[About the Documentation]. | |
link:https://github.com/reactor/reactor-core/edit/main/docs/modules/ROOT/pages/aboutDoc.adoc[Edit this Page^, role="fa fa-edit"] to make changes to xref:aboutDoc.adoc[About the Documentation] page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see 75f03a8
@@ -13,7 +13,6 @@ To use it in your tests, you must add it as a test dependency. | |||
The following example shows how to add `reactor-test` as a dependency in Maven: | |||
|
|||
.reactor-test in Maven, in `<dependencies>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether or how this can be fixed but please verify ALL the Example N. Title
places in the documentation - some of them now start with the word "Example", some don't. In the current documentation all examples have the same prefix and a significant and useful number. It would be a good idea to keep that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other problem is that the rendering of these "Example" headers don't provide a background for the monospace font and it is inconsistent with what we had and what other monospaced highlights provide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether or how this can be fixed but please verify ALL the Example N. Title places in the documentation - some of them now start with the word "Example", some don't. In the current documentation all examples have the same prefix and a significant and useful number. It would be a good idea to keep that.
The problem is that before, all example titles were indeed automatically prefixed with Example N
, but I cannot find a way to re-enable this behavior.
So, before, we had few titles starting with Example
word, like these ones:
.Example of Callback Hell
.Example of Reactor code equivalent to callback code
.Example of Reactor code with timeout and fallback
.Example of `CompletableFuture` combination
.Example of Reactor code equivalent to future code
.Example of state-based `generate`
which were respectively rendered like this:
Example 5. Example of Callback Hell
Example 6. Example of Reactor code equivalent to callback code
Example 7. Example of Reactor code with timeout and fallback
Example 8. Example of CompletableFuture combination
Example 9. Example of Reactor code equivalent to future code
Example 11. Example of state-based generate
So, now, for these titles, they are rendered without the Example N
prefix, but we still see the Example
word, because these few examples title are starting with the Example
word:
Example of Callback Hell
Example of Reactor code equivalent to callback code
Example of Reactor code with timeout and fallback
Example of CompletableFuture combination
Example of Reactor code equivalent to future code
Example of state-based generate
The other problem is that the rendering of these "Example" headers don't provide a background for the monospace font and it is inconsistent with what we had and what other monospaced highlights provide.
I suspect that this is also related to the antora-ui-projectreactor (I'm not sure).
Since for the moment, I'm unable to re-enable automatic generation of the Example N.
prefix, I would prefer to address this issue in a specific new PR, if you don't mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you decide to make a change in additional PR, please create an issue so that we do not forget. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created the issue to not forget about: #3811
docs/modules/ROOT/pages/metrics.adoc
Outdated
|
||
// FIXME reactor-monitoring-demo won't be in sync with 3.5.0 anymore | ||
FIXME reactor-monitoring-demo won't be in sync with 3.5.0 anymore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit is supposed to be hidden
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in b2f925c
General comment around the change of structure and URIs – do you have a plan to redirect existing links to our documentation out in the wild to the new structure? E.g. https://www.canva.dev/blog/engineering/enabling-real-time-collaboration-with-rsocket/ in the section about Logs has a link to https://projectreactor.io/docs/core/release/reference/#faq.mdc which as I understand would now fail. I believe it would be worth considering a way to make some redirections to aid users in finding this content. |
…K version is lower than 17
with d3762ab, a friendly message is now logged in case 'antora' or 'docs' tasks are used when JDK version is lower than 17. |
in some cases, we could possibly use For this particular case, we need to configure some redirect mapping in Cloudflare. I have create #3812 issue to address this problem separately. |
@chemicL , I think I have addressed your feedbacks, except the following:
please have a look to my new commits, when you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pderop Thank you for addressing the comments and creating issues for the remainder. I'm going to check the PDF now but otherwise I think all is good, so approving.
Last remark: |
This PR attempts to migrate Reactor Core reference documentation to Antora, and includes the following logical commits:
publish
CI in order to build the docs-zip artifact using a separate build-docs-zip job. This job uses JDK21 to generate antora doc because the antora gradle plugin requires a JDK17 compatible JVM. Once thedocs-zip
artifact is generated, it is then uploaded to the workflow run, and then the other deploy jobs (deploySnapshot/deployMilestone/deployRelease) can then download it to ./docs/build/distributions/ directory, and let it be included in the published artifacts. The cleanup job makes sure that the artifact is deleted from the workflow run once all deploy jobs are finished.To test this PR:
you can browse docs/build/site/index.html
The search is not yet enabled, it will be enabled once we'll have merged this PR because it's needed to crawl the documentation using Algolia from projectreactor.io site.
To test docs.zip generation:
it will generate docs/build/distributions/reactor-core-3.7.0-SNAPSHOT-docs.zip
To test publication:
Trouble building the project
section in the reactor core README).All jars should be built with proper jdk versions because toolchain is used.
To test publication in two steps:
If using JDK21 as the default JDK version is really an issue, you can then publish everything in two steps:
./gradlew docs
: this will only build the docs.zip./gradlew publishToMavenLocal
, this command will pick up the docs.zip previously built in step 1 and will include it in local M2To test PDF generation
As before, PDF are not generated by default in snapshot mode. If you want to generate a PDF, then do the following:
asciidoctor-pdf
command, because the antora pdf assembler requires it:docs is generated as before in docs/build/site/index.html, but this time a PDF is also generated in ./docs/build/assembler/reactor/3.7.0/reactor-3-reference-guide.pdf
If you want to include the pdf in the docs.zip distribution file:
and the pdf will be generated and included in the docs.zip:
as before, PDF is generated and included when releasing a RELEASE, or RC, or a MILESTONE, but not when releasing a SNAPSHOT version.
Fixes #3083