Skip to content

Latest commit

 

History

History
235 lines (174 loc) · 10.8 KB

doc-reference.adoc

File metadata and controls

235 lines (174 loc) · 10.8 KB

About Quarkus documentation

Source locations

Quarkus doc sources are built and synced to the Quarkus.io website at release time.

  • Documentation for Quarkus core and most extensions is located in the docs module of the Quarkus GitHub repository.

  • Docs for Quarkiverse or other third-party extensions are pulled directly from those repositories.

The Asciidoc files can be found in the src/main/asciidoc directory within the docs module.

Templates

Create new documentation files using the appropriate template for the content type:

Concepts

Use src/main/asciidoc/_templates/template-concepts.adoc

How-To Guides

Use src/main/asciidoc/_templates/template-howto.adoc

Reference

Use src/main/asciidoc/_templates/template-reference.adoc

Tutorials

Use src/main/asciidoc/_templates/template-tutorial.adoc

Output locations

Configuration references

Javadoc comments discovered in MicroProfile Config source files are used to generate config reference documentation. These generated files are found in target/asciidoc/generated/config/ (from the project root).

Asciidoc output as HTML

A locally-rendered result of asciidoc processing (which is similar, but not identical, to that used to generate website documentation) is found in docs/target/generated-docs/

Titles and headings

Regardless of content type, ensure that the main title and any headings in your document are:

  • Goal-oriented and use the language and keywords of the audience

  • Descriptive and avoid filler words

  • Between 3-12 words and 50-80 characters per line to optimize findability in search engines

  • In sentence case capitalization style

Your titles and headings must also follow the specific guidance for the Quarkus content types, as outlined in the following table:

Table 1. Title guidance for different Quarkus content types
Content type Should …​ Good example Bad example

Concept

  • Start with a noun that names the concept or topic

  • Never start with an active verb, for example, an action word like configure, install, or start

  • Finish the implied sentence: "Understanding … "

Security and authentication mechanisms in Quarkus

Discovering Reactive SQL Clients In Quarkus

How-To Guide

  • Start with an active verb in the imperative verb form, for example, ‘Create a …​’ or ‘Secure a …​’

  • Be action-oriented or task-oriented, rather than feature-oriented

  • Finish the implied sentence: "How to.."

Secure your Quarkus application with WebAuthn authentication

Applying WebAuthn Authentication In Quarkus

Reference

  • Use a noun phrase to concisely summarize the content of the document

  • Not include the word 'reference'

  • Finish the implied sentence: "About …​"

Hibernate Reactive API configuration properties

Reference guide for Configuring Hibernate Reactive API Configuration Properties

Tutorial

  • Start with an active verb in the imperative verb form, for example, ‘Create a …​’ or ‘Secure a …​’

  • State what task the user will complete, with emphasis on the key topic or demonstrated activity

  • Be action-oriented or task-oriented, rather than feature-oriented

  • Be led by the needs of the user in learning mode.

  • Finish the implied sentence: "In this tutorial, you will… "

Create a Quarkus application in JVM mode by using the quick start example

Creating an App

File naming conventions

Quarkus docs are stored in a fairly flat structure in an effort to make things easier to discover. The bulk of the file name should be some representation of its title. Use all lowercase letters, separate words with hyphens, and don’t use symbols or special characters.

Prefix

Use a common prefix to group related documents, e.g. all of the documents related to writing Quarkus docs are prefixed with doc-.

Suffix

The file name should reflect the type of document:

  • Concept documents should end in -concepts.adoc

  • How-to guides should end in -howto.adoc

  • References should end in -reference.adoc

  • Tutorials should end in -tutorial.adoc

Asciidoc syntax

Quarkus docs use Asciidoc syntax. The following links provide background on Asciidoc syntax and general conventions.

Semantic line breaks

Text in paragraphs, lists, and tables should be broken into pieces that are easier to review[1]. Start a new line at the end of each sentence, and split sentences themselves at natural breaks between clauses.

Abstracts (preamble)

For optimum findability, add a short description using user-oriented keywords to summarize the document’s purpose, task, and intent in no more than three sentences. Good abstracts also mention the benefits of following this content and avoid filler words, such as: "This document..", "This tutorial..", and "The following.."

Important

The first sentence of the abstract must explain the value and some benefit of the content in less than 26 words because this automatically displays on the Quarkus guides homepage.

Automatic Table of Contents (TOC)

Use :toc: preamble in the document header to insert an automatically generated TOC after the abstract (or preamble) to the document. For example, this document has the following in its header:

[id="reference-doc-quarkus-documentation"]
= Quarkus documentation reference
include::attributes.adoc[]
:toc: preamble

Using sections

Section titles should be written in sentence case, rather than title case.

All documents should start with a Title (a = Level 0 heading), and should be broken into subsections as appropriate (== Level 1 to ====== Level 5) without skipping any levels.

Tip

Deep nesting (====== Level 4, ====== Level 5) should be avoided whenever possible. If you end up with deeply nested sections, think about the following:

  • Is this information in the right place? For example, if this is a reference, should some of this content be moved to a concept doc or how-to guide instead?

  • Can the content be re-organized to make it simpler to consume?

See Quarkus documentation concepts for more information about content types and organization.

In general, prefer using url macros to using bare or automatic links. Provide human-readable text for the link, especially if it is included in the middle of other text.

Note
A URL Macro link with attributes

The URL macro also supports additional attributes that may be relevant, like opening a link in a different window.

https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/[Asciidoc Syntax Quick Reference,window=_blank,opts=nofollow]

The above source produces this link: Asciidoc Syntax Quick Reference.

Cross-references

Quarkus documentation is built from source in a few different environments. We use attributes in our cross-references to ensure our docs can be built across these environments.

Cross-reference source attributes
link:attributes.adoc[role=include]

When cross-referencing content, always use the inter-document xref: syntax and supply a human-readable label to your link.

Cross-reference example
xref:{doc-guides}/doc-concepts.adoc[Quarkus Documentation concepts] (1)
  1. The cross reference starts with xref:, uses a cross-reference source attribute({doc-guides}), and provides a readable description: [Quarkus Documentation concepts]

Variables for use in documents

The following variables externalize key information that can change over time, and so references to such information should be done by using the variable inside of {} curly brackets. The complete list of externalized variables for use is given in the following table:

Table 2. Variables
Property Name Value Description

{quarkus-version}

{quarkus-version}

The current version of the project.

{quarkus-home-url}

{quarkus-home-url}

The location of the project home page.

{quarkus-site-getting-started}

{quarkus-site-getting-started}

The location of the getting started page.

{quarkus-org-url}

{quarkus-org-url}

The location of the project GitHub organization.

{quarkus-base-url}

{quarkus-base-url}

Quarkus GitHub URL common base prefix.

{quarkus-clone-url}

{quarkus-clone-url}

Quarkus URL for git clone referenced by the documentation.

{quarkus-archive-url}

{quarkus-archive-url}

Quarkus URL to main source archive.

{quarkus-blob-url}

{quarkus-blob-url}

Quarkus URL to main blob source tree; used for referencing source files.

{quarkus-tree-url}

{quarkus-tree-url}

Quarkus URL to main source tree root; used for referencing directories.

{quarkus-issues-url}

{quarkus-issues-url}

Quarkus URL to the issues page.

{quarkus-images-url}

{quarkus-images-url}

Quarkus URL to set of container images delivered for Quarkus.

{quarkus-chat-url}

{quarkus-chat-url}

URL of our chat.

{quarkus-mailing-list-subscription-email}

{quarkus-mailing-list-subscription-email}

Email used to subscribe to our mailing list.

{quarkus-mailing-list-index}

{quarkus-mailing-list-index}

Mailing list index page.

{quickstarts-base-url}

{quickstarts-base-url}

Quickstarts URL common base prefix.

{quickstarts-clone-url}

{quickstarts-clone-url}

Quickstarts URL for git clone referenced by the documentation.

{quickstarts-archive-url}

{quickstarts-archive-url}

Quickstarts URL to main source archive.

{quickstarts-blob-url}

{quickstarts-blob-url}

Quickstarts URL to main blob source tree; used for referencing source files.

{quickstarts-tree-url}

{quickstarts-tree-url}

Quickstarts URL to main source tree root; used for referencing directories.

{graalvm-version}

{graalvm-version}

Recommended GraalVM version to use.

{graalvm-flavor}

{graalvm-flavor}

The full flavor of GraalVM to use e.g. 19.3.1-java11. Make sure to use a java11 version.