Contribute to Quarkus documentation
Contribute to the documentation by using the recommended steps, workflow, and style guidance to ensure the content successfully renders on the Quarkus website portal.
Quarkus docs use AsciiDoc markup.
We suggest you have the following materials nearby:
An editor or IDE that provides syntax highlighting and previews for AsciiDoc, either natively or with a plugin.
The Quarkus style and content guidelines for the required syntax, preferred style, and other conventions.
Locate the source files for Quarkus docs
AsciiDoc files are in the
src/main/asciidocdirectory within the
docsmodule of the Quarkus GitHub repository.
Configuration documentation is generated from JavaDoc comments in Java source files.
Java, YAML, and other source files can also be referenced by AsciiDoc files.
The Quarkus documentation menu page, also known as the doc index page, is sourced in the quarkusio.github.io repository.
Create Quarkus content in AsciiDoc
To ensure that your content shows up correctly on the Quarkus documentation home page, use the following steps:
Decide on a content type that best fits the content that you are contributing.
To help you decide, see the content type descriptions in Titles and headings on the "About Quarkus documentation" page.
Go to the
src/main/asciidoc/_templatesdirectory, and make a copy of the relevant template for the content type you have chosen. Be sure to:
Use the filename syntax of`<category>-<titlekeyword>-<titlekeyword>-<content-type>.adoc`. For example,
Save the file to the
docs/src/main/asciidocfolder in the
Set the minimum required header information as outlined in the following example:
[id="security-basic-authentication-howto"] (1) = Secure a Quarkus application with basic authentication (2) include::_attributes.adoc <3> :categories: security,web (4)
1 Set the
idvalue to be the same as the file name but without the extension. You can shorten this if the file name is too long.
2 For information about how to create a good title for each content type, see Titles and headings on the "Quarkus style and content guidelines" page. 3 The
_attributes.adocinclude is required to ensure that attributes get resolved, the table of contents is generated, and content renders in the website portal.
4 Set at least one category to ensure that the content is findable on the Quarkus documentation home page. For a list of Quarkus categories, see Document attributes and variables on the "Quarkus style and content guidelines" page.
Ensure there are no line breaks in the header section until after
Add an abstract to describe the purpose of the guide.
The first sentence of the abstract must explain the value and some benefit of the content in less than 27 words because this automatically displays on the Quarkus guides homepage. There must also be a line break before and after the abstract.
For more information about the minimum header requirements, see Document structure on the "Quarkus style and content guidelines" page.
Retire and redirect an existing Quarkus AsciiDoc source file
As content evolves, you might want to restructure an existing piece of Quarkus content into one or more content types and retire the existing AsciiDoc source file.
If you are retiring or renaming a published Quarkus AsciiDoc source file, ensure that the restructure does not break existing bookmarks and links to original content. Configure a URL redirect in the Quarkus.io Website GitHub repository by using the following steps:
Switch to the quarkusio/quarkusio.github.io repository, and open the
Create a redirection file in Markdown format with a filename that matches the original AsciiDoc source filename that you want to retire.
Add the following contents to the Markdown redirection file:
--- permalink: /guides/<original_asciidoc_filename>/index.html (1) newUrl: /guides/<new_asciidoc_filename> (2) ---
1 Is the name of the original AsciiDoc source file that you are retiring, without the
2 Is the name of the AsciiDoc source file that you want to redirect to, without the
|Name of original AsciiDoc source file||Name of target file to redirect to||Redirection file||Example pull request|
Preview and build Quarkus documentation
Before you submit a pull request, preview the HTML output of your AsciiDoc source by using one of the following build methods:
For minor documentation changes, you can use the AsciiDoc syntax highlighting and preview provided by your IDE.
For significant changes or updates to generated configuration documentation, build the
docsmodule locally and run the Vale linter as outlined in the following sections.
docs module locally
The following will build all modules in the Quarkus repository (except test modules) and install them in your local maven repository with the
Generated AsciiDoc (
adocfiles) describing configuration properties in the
AsciiDoc output (
htmlfiles) in the
YAML files containing metadata for all documents individually (
docs/target/indexByFile.yaml) and grouped by document type (
YAML files that list metadata errors by file (
docs/target/errorsByFile.yaml) and by error type (
Review the resulting output and fix any issues before you submit your changes in a PR for review.
As you make changes, you can rebuild the
docs module specifically to update the generated HTML:
./mvnw -f docs clean install
When updating extension configuration:
Lint documentation changes with Vale
Our builds use Vale to check grammar, style, and word usage in the English versions of our documents. We created our own Vale style ruleset to ensure that content aligns with the preferred Quarkus style guidelines.
This approach requires a working container runtime (Docker or Podman).
docs module has a JUnit 5 test that will run the Vale linter in a container (using Testcontainers). It verifies both Quarkus document metadata and Vale style rules.
Run the test in one of the following ways:
./mvnw -f docs test -Dvale -DvaleLevel=suggestion (1) ./mvnw -f docs test -Dvale=git -DvaleLevel=warning (2) ./mvnw -f docs test -Dvale='doc-.*' -DvaleLevel=error (3)
|1||Run the Vale linter for all
|2||Run the Vale linter for any modified
|3||Run the Vale linter for
Use the Vale CLI
If you install the Vale CLI, you must specify the configuration file and the directory or list of files to scan:
# Run from the Quarkus project root vale --config=docs/.vale.ini --minAlertLevel=warning docs/src/main/asciidoc # Run from within the docs directory vale --minAlertLevel=warning src/main/asciidoc
For more information, see the Vale CLI Manual.
Vale IDE plugins
Vale IDE integrations require the Vale CLI to be installed.
Each IDE integration has its own configuration requirements. The Visual Studio Code IDE extension, for example, requires definition of the Vale CLI path:
Creating pull requests for doc updates
Submit your proposed changes to the core Quarkus docs by creating a pull request against the
main branch of the Quarkus repository from your own repository fork.
Reviews for code and documentation have different (but overlapping) participants. To simplify collaborative review, either isolate changes to docs in their own PRs, or ensure that the PR has a single, focused purpose. For example:
Create a single PR that adds a configuration option for an extension and updates related materials (how-to, reference) to explain the change.
Create a single PR for related changes to a group of documents, some examples: correcting the usage of a term, correcting a recurring error, or moving common content into a shared file.
If there are extensive code changes and documentation changes, create a separate PR for the documentation changes and include the relationship in the issue description.
Pull requests that contain changes to documentation will have the
area/documentation label added automatically.
Automatic style checking on the PR diff
The Vale linter job automatically runs when a PR is created or updated. If your content updates do not align with the key style or terminology preferences of the Quarkus community, the updated line on the diff tab gets annotated with the Vale recommendations. To ensure that your content gets approved, fix the linter errors, warnings, and suggestions.
We welcome your feedback on the Quarkus documentation style guidelines.
If you disagree with the Vale results, be sure to add the yellow PR label
Previewing doc changes on the Quarkus website
After your PR is merged to
main and the branch is synchronized with the Quarkus.io website repository, you can preview the resulting build output on the Main branch (SNAPSHOT) documentation page of the Quarkus site.