Skip to content
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

Fix Docs generation - allow each table to have Duration note #26305

Merged

Conversation

michalvavrik
Copy link
Member

@michalvavrik michalvavrik commented Jun 22, 2022

Fixes: #19330

Currently when 2+ tables with generated configuration properties are included in adoc file and these config tables contain Duration config key, an exception is thrown and documentation build fails. That's because block id must be unique and Asciidoctor documentation explain how to solve this problem. As I read it in order to use solution, I had to switch from legacy block anchor syntax to longhand syntax. I mentioned you are using workaround no-duration-note, but that's not desirable as each summary table should have it's Duration note if needed, however I left possibility to disable duration note as an option for authors (f.e. you have multiple tables one after another and you feel the note should be included just after the last one...). I checked the quarkusio.github.io and there are no changes required to quarkusio.github.io as there is no specific styling applied base on note block id.

As an example, you can checkout current upstream doc for Datasources and compare it with attached example that I generated with changes included in this PR.
generated_datasource_guide_2_durations.tar.gz

Fixes: 19330

Currently where 2+ tables with generated configuration properties are included in `adoc` file and these config tables contain `Duration` config key, an exception is thrown and documentation build fails. That's because block id must be unique and [Asciidoctor documentation explain how to solve this problem](https://docs.asciidoctor.org/asciidoc/latest/directives/include-multiple-times-in-same-document/). As I read it in order to use solution, [I had](asciidoctor/asciidoctor#1381) to switch from [legacy block anchor syntax](https://docs.asciidoctor.org/asciidoc/latest/attributes/id/#block-assignment) to longhand syntax. I mentioned you are using workaround `no-duration-note`, but that's not desirable as each summary table should have it's Duration note if needed, however I left possibility to to disable duration note as an option for authors (f.e. you have multiple tables one after another and you feel the note should be included just after the last one...). I checked and there are no changes required to quarkusio.github.io as there is no specific styling applied base on note block id.
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice improvement!

@gsmet gsmet merged commit 76af64d into quarkusio:main Jun 23, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jun 23, 2022
@michalvavrik michalvavrik deleted the feature/fix-docs-duration-note-generation branch June 23, 2022 08:47
@machi1990
Copy link
Member

Thanks, nice improvement!

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not possible to include multiple config items in adoc if they both have Duration
3 participants