diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index 5ed10dba6d7df..1f2c80a675d9f 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -1,19 +1,20 @@ = README: Quarkus documentation include::_attributes.adoc[] -Quarkus documentation uses asciidoc syntax. +Quarkus documentation uses link:https://asciidoc.org/[AsciiDoc] markup. -A gradual refactoring effort is underway to reshape Quarkus documentation to make it easier to both read and write (see xref:doc-concept.adoc[Quarkus documentation concepts] for more on this transition). +A gradual refactoring effort is underway to reshape Quarkus documentation to make it easier to both read and write. For more information about this transition, see xref:doc-concept.adoc[Quarkus documentation content types]. For more information on contributing to Quarkus docs, see: -- xref:doc-contribute-docs-howto.adoc[How to contribute documentation] -- xref:doc-concept.adoc[Quarkus documentation concepts] -- xref:doc-reference.adoc[Quarkus documentation reference] +- xref:doc-contribute-docs-howto.adoc[Contribute to Quarkus documentation] +- xref:doc-concept.adoc[Quarkus documentation content types] +- xref:doc-reference.adoc[Quarkus style and content guidelines] +- xref:doc-create-tutorial.adoc[Creating a tutorial] == Glossary -This is a collection of preferred term in the documentation and website. +This is a collection of preferred terms in the documentation and website. Please stay within these terms for consistency. * Live coding:: for our `quarkus:dev` capability diff --git a/docs/src/main/asciidoc/_templates/template-concept.adoc b/docs/src/main/asciidoc/_templates/template-concept.adoc index fcfeb13e5276e..5d74926d19b59 100644 --- a/docs/src/main/asciidoc/_templates/template-concept.adoc +++ b/docs/src/main/asciidoc/_templates/template-concept.adoc @@ -4,7 +4,7 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// //// -TODO: See Quarkus documentation reference for details +TODO: xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] for details - Title should have an implied "Understanding..." in front. - ID should end with '-concept' (using the filename works) - choose appropriate categories @@ -15,8 +15,8 @@ include::_attributes.adoc[] :categories: ... //// :extension-status: preview -TODO: uncomment the above for for an experimental or tech-preview content. -The document header ends at the first blank line. +TODO: uncomment the above for experimental or tech-preview content. +The document header ends at the first blank line. Do not remove the blank line between the header and the abstract summary. //// A short introduction that summarizes or frames the concept. @@ -29,8 +29,8 @@ include::{includes}/extension-status.adoc[] == Create additional sections -- xref:{doc-guides}/doc-concept.adoc#concept[Documentation concepts: Concept guides] -- xref:{doc-guides}/doc-reference.adoc[Quarkus documentation reference] +- xref:{doc-guides}/doc-concept.adoc#concept[Quarkus documentation content types: Concept guides] +- xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] == Guidelines for a good Concept doc @@ -43,7 +43,11 @@ Explanation/Concept documents should do things that the other parts of the docum == Language tips: - Explain: "The reason for x is because historically, y…" -- Offer judgements and even opinions where appropriate.., "W is better than z, because…" +- Offer judgments and even opinions where appropriate.., "W is better than z, because…" - Provide context that helps the reader: "An x in system y is analogous to a w in system z. However…" - Weigh up alternatives: "Some users prefer w (because z). This can be a good approach, but…" -- Unfold the machinery’s internal secrets, to help understand why something does what it does: "An x interacts with a y as follows:…" \ No newline at end of file +- Unfold the machinery’s internal secrets, to help understand why something does what it does: "An x interacts with a y as follows:…" + +== References + +To help direct the reader to more information about the content topic, optionally add a *References* section to the end of the page and include `links` or `xrefs` to other related content resources. diff --git a/docs/src/main/asciidoc/_templates/template-howto.adoc b/docs/src/main/asciidoc/_templates/template-howto.adoc index 7317e3581fbf5..a113412c9ac65 100644 --- a/docs/src/main/asciidoc/_templates/template-howto.adoc +++ b/docs/src/main/asciidoc/_templates/template-howto.adoc @@ -4,7 +4,7 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// //// -TODO: See Quarkus documentation reference for details +TODO: See xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] for details - Title should have an implied "How to..." in front. - ID should end with '-howto' (using the filename works) - choose appropriate categories @@ -15,11 +15,11 @@ include::_attributes.adoc[] :categories: ... //// :extension-status: preview -TODO: uncomment the above for for an experimental or tech-preview content. -The document header ends at the first blank line. +TODO: uncomment the above for experimental or tech-preview content. +The document header ends at the first blank line. Do not remove the blank line between the header and the abstract summary. //// -How-to guides are goal-oriented, and should help the reader accomplish a task (where there may be forks in the path). +How-to guides are goal-oriented and should help the reader accomplish a task (where there may be forks in the path). //// TODO: If this is a reference for an experimental or tech-preview extension, uncomment the following (otherwise delete) @@ -33,16 +33,20 @@ Your user will also be in the middle of something: define the starting-point tha == Resources - xref:{doc-guides}/doc-create-howto-tutorial.adoc[Tutorial: Create a How-To] -- xref:{doc-guides}/doc-concept.adoc#howto-guide[Documentation concepts: How-to guides] -- xref:{doc-guides}/doc-reference.adoc[Quarkus documentation reference] +- xref:{doc-guides}/doc-concept.adoc#howto-guide[Quarkus documentation content types: How-to guides] +- xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] == Guidelines for good How-To guides -- Don’t explain concepts; link to a related concept/explainer -- Be flexible; a how-to guide needs to be adaptable to real-world use-cases. +- Don’t explain concepts; link to a related concept/explainer. +- Be flexible; a how-to guide needs to be adaptable to real-world use cases. - Omit the unnecessary; practical usability is more helpful than completeness. == Examples Baeldung tutorials provide solid examples of How-To guides. -For example, "How to use Jackson annotations" is answered (with variations) here: https://www.baeldung.com/jackson-annotations \ No newline at end of file +For example, "How to use Jackson annotations" is answered (with variations) here: https://www.baeldung.com/jackson-annotations + +== References + +To help direct the reader to more information about the content topic, optionally add a *References* section to the end of the page and include `links` or `xrefs` to other related content resources. \ No newline at end of file diff --git a/docs/src/main/asciidoc/_templates/template-reference.adoc b/docs/src/main/asciidoc/_templates/template-reference.adoc index 9cedefd56b250..36f8a8f299f1c 100644 --- a/docs/src/main/asciidoc/_templates/template-reference.adoc +++ b/docs/src/main/asciidoc/_templates/template-reference.adoc @@ -4,7 +4,7 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// //// -TODO: See Quarkus documentation reference for details +TODO: See xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] for details - Title should have an implied "About..." in front. - ID should end with '-reference' (using the filename works) - choose appropriate categories @@ -15,8 +15,8 @@ include::_attributes.adoc[] :categories: ... //// :extension-status: preview -TODO: uncomment the above for for an experimental or tech-preview content. -The document header ends at the first blank line. +TODO: uncomment the above for experimental or tech-preview content. +The document header ends at the first blank line. Do not remove the blank line between the header and the abstract summary. //// A short introduction that describes the content of this reference. @@ -29,8 +29,8 @@ include::{includes}/extension-status.adoc[] == Add additional sections -- xref:{doc-guides}/doc-concept.adoc#reference[Documentation concepts: Reference guides] -- xref:{doc-guides}/doc-reference.adoc[Quarkus documentation reference] +- xref:{doc-guides}/doc-concept.adoc#reference[Quarkus documentation content types: Reference guides] +- xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] == Guidelines for a good reference @@ -52,4 +52,8 @@ TODO: If this is an extension reference, include the relevant configuration == Configuration Reference include::{generated-dir}/config/<>.adoc[opts=optional, leveloffset=+1] -//// \ No newline at end of file +//// + +== References + +To help direct the reader to more information about the content topic, optionally add a *References* section to the end of the page and include `links` or `xrefs` to other related content resources. \ No newline at end of file diff --git a/docs/src/main/asciidoc/_templates/template-tutorial.adoc b/docs/src/main/asciidoc/_templates/template-tutorial.adoc index 0bde8045281d9..53b4b8ee900c4 100644 --- a/docs/src/main/asciidoc/_templates/template-tutorial.adoc +++ b/docs/src/main/asciidoc/_templates/template-tutorial.adoc @@ -4,7 +4,7 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// //// -TODO: See Quarkus documentation reference for details +TODO: See xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines]for details - Finish a sentence like: "Create a ...", "How to ..." - ID should end with '-tutorial' (using the filename works) - choose appropriate categories @@ -15,8 +15,8 @@ include::_attributes.adoc[] :categories: ... //// :extension-status: preview -TODO: uncomment the above for for an experimental or tech-preview content. -The document header ends at the first blank line. +TODO: uncomment the above for experimental or tech-preview content. +The document header ends at the first blank line. Do not remove the blank line between the header and the abstract summary. //// Describe what the learner will accomplish (examples: build, create, construct, deploy; not: “you will learn...”). @@ -43,8 +43,8 @@ This file offers a few different variables that can be used to tweak what is sho == Outline steps - xref:{doc-guides}/doc-create-tutorial.adoc[Tutorial: Create a tutorial] -- xref:{doc-guides}/doc-concept.adoc#tutorial[Documentation concepts: Tutorials] -- xref:{doc-guides}/doc-reference.adoc[Quarkus documentation reference] +- xref:{doc-guides}/doc-concept.adoc#tutorial[Quarkus documentation content types: Tutorials] +- xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] Each step should conclude with a comprehensible/observable result. @@ -61,3 +61,7 @@ Link to more detailed explanation. == Summary In closing, describe (and admire, in a mild way) what your learner has accomplished (not: “you have learned…”). + +== References + +To help direct the reader to more information about the content topic, optionally add a *References* section to the end of the page and include `links` or `xrefs` to other related content resources. \ No newline at end of file diff --git a/docs/src/main/asciidoc/doc-concept.adoc b/docs/src/main/asciidoc/doc-concept.adoc index 60bf0c94d05dc..a12e85e46e3e6 100644 --- a/docs/src/main/asciidoc/doc-concept.adoc +++ b/docs/src/main/asciidoc/doc-concept.adoc @@ -4,20 +4,27 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// [id="doc-concept"] -= Quarkus documentation concepts += Quarkus documentation content types include::_attributes.adoc[] :categories: contributing :fn-diataxis: footnote:diataxis[Procida, D. Diátaxis documentation framework. https://diataxis.fr/] -Overview of concepts underlying the structure and composition of Quarkus docs. +Quarkus documentation is structured into four distinct content types: concepts, how-tos, tutorials, and references. +The composition and structure of Quarkus docs follow the Diátaxis systematic documentation framework for technical documentation authoring. +Each content type resolves a different user need, fulfills a different purpose, and requires a different approach to its creation. -== Content Types +== Diátaxis documentation framework + +We chose to align Quarkus docs with the Diátaxis documentation framework{fn-diataxis}, which defines a core content structure that addresses the different needs users have when consulting docs. + +image::diataxis-framework.png[The content types in the Diátaxis documentation framework{fn-diataxis},width=40%, align=left] + +*Image credit: https://diataxis.fr/* -We are aligning Quarkus docs with the Diátaxis documentation framework{fn-diataxis}, which defines a core content structure that addresses the different needs users have when consulting docs. What follows is a brief summary of the different document types, but their site is worth a read if you want to understand more of the reasoning behind this classification. [[concept]] -=== Concept guides (Explanation) +== Concept guides (Explanation) > Explanation is _discussion_ that clarifies and illuminates a particular topic. Explanation is _understanding-oriented_. @@ -34,7 +41,7 @@ You can cite design decisions, historical reasons, and technical constraints to - may express opinions about advantages and drawbacks of the concept that you are explaining relative to different potential use cases or applications. [[howto-guide]] -=== How-To guides +== How-to guides > How-to guides are _directions_ that take the reader through the steps required to solve a real-world problem. How-to guides are _goal-oriented_. @@ -49,7 +56,7 @@ Good how-to guides: - are practical (rather than complete). [[reference]] -=== Reference guides +== Reference guides > Reference guides are _technical descriptions_ of the machinery and how to operate it. Reference material is _information-oriented_. @@ -66,7 +73,7 @@ Good reference guides: [[tutorial]] -=== Tutorials +== Tutorials > Tutorials are _lessons_ that take the reader by the hand through a series of steps to complete a project of some kind. Tutorials are _learning-oriented_. @@ -78,8 +85,5 @@ Good tutorials: - are reliable and consistent (they work for all users, every time). - include only enough information to complete the task. They delegate to other documentation types (concepts or reference) to provide additional context. -- focus on one way of doing the task. Alternative approaches are explored in other document types - (a how-to guide, for example). - - - +- focus on one way of doing the task. +Alternative approaches are explored in other document types (a how-to guide, for example). \ No newline at end of file diff --git a/docs/src/main/asciidoc/doc-contribute-docs-howto.adoc b/docs/src/main/asciidoc/doc-contribute-docs-howto.adoc index 3e057e24e7a06..d78ad6eb019a7 100644 --- a/docs/src/main/asciidoc/doc-contribute-docs-howto.adoc +++ b/docs/src/main/asciidoc/doc-contribute-docs-howto.adoc @@ -4,44 +4,125 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// [id="doc-contribute-howto"] -= How to contribute documentation += Contribute to Quarkus documentation include::_attributes.adoc[] :categories: contributing :fn-diataxis: footnote:diataxis[Procida, D. Diátaxis documentation framework. https://diataxis.fr/] -Outline the recommended steps for making successful contributions 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. == Prerequisites -Quarkus docs use AsciiDoc, a lightweight markup language. +Quarkus docs use link:https://asciidoc.org/[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 https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/[AsciiDoc syntax reference] -- The xref:{doc-guides}/doc-reference.adoc[Quarkus documentation reference] for required syntax and other conventions. +- The xref:{doc-guides}/doc-reference.adoc[Quarkus style and content guidelines] for the required syntax, preferred style, and other conventions. -== Sources +== Locate the source files for Quarkus docs - AsciiDoc files are in the `src/main/asciidoc` directory within the `docs` module of the {quarkus-base-url}/tree/main/docs[Quarkus GitHub repository]. - Configuration documentation is generated from JavaDoc comments in Java source files. - Java, YAML, and other source files can also be xref:doc-reference.adoc#reference-source-code[referenced] by AsciiDoc files. +- The link:https://quarkus.io/guides/[Quarkus documentation] menu page, also known as the doc index page, is sourced in the link:https://github.com/quarkusio/quarkusio.github.io[quarkusio.github.io] repository. + + +== Create Quarkus content in AsciiDoc + +To ensure that your content shows up correctly on the link:https://quarkus.io/guides/[Quarkus documentation home page], use the following steps: + +. Decide on a content type that best fits the content that you are contributing. ++ +TIP: To help you decide, see the content type descriptions in xref:{doc-guides}/doc-reference.adoc#titles-and-headings[Titles and headings] on the "About Quarkus documentation" page. ++ +. Go to the `src/main/asciidoc/_templates` directory, and make a copy of the relevant template for the content type you have chosen. Be sure to: +** Use the filename syntax of`---.adoc`. For example, `security-basic-authentication-tutorial.adoc`. +** Save the file to the `docs/src/main/asciidoc` folder in the `quarkus` repository. +. Set the minimum required header information as outlined in the following example: ++ +[source,asciidoc] +---- +[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 `id` value 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 xref:{doc-guides}/doc-reference.adoc#titles-and-headings[Titles and headings] on the "Quarkus style and content guidelines" page. +<3> The `_attributes.adoc` include 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 link:https://quarkus.io/guides/[Quarkus documentation home page]. For a list of Quarkus categories, see xref:{doc-guides}/doc-reference.adoc#document-attributes-and-variables[Document attributes and variables] on the "Quarkus style and content guidelines" page. ++ +[IMPORTANT] +==== +Ensure there are no line breaks in the header section until after `:categories:` line. +==== ++ +. Add an abstract to describe the purpose of the guide. +[IMPORTANT] +==== +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 link:https://quarkus.io/guides/[Quarkus guides homepage]. +There must also be a line break before and after the abstract. +==== + +For more information about the minimum header requirements, see xref:{doc-guides}/doc-reference.adoc#document-structure[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 link:https://github.com/quarkusio/quarkusio.github.io/[Quarkus.io Website] GitHub repository by using the following steps: + +. Switch to the link:https://github.com/quarkusio/quarkusio.github.io/tree/develop/_redirects/guides[quarkusio/quarkusio.github.io] repository, and open the `_redirects/guides` folder. +. 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: ++ +[source,markdown] +--- +permalink: /guides//index.html // <1> +newUrl: /guides/ // <2> +--- ++ +Where: +<1> Is the name of the original AsciiDoc source file that you are retiring, without the `.adoc` file extension. +<2> Is the name of the AsciiDoc source file that you want to redirect to, without the `.adoc` file extension. + +.Example + +[Attributes] +|=== +|Name of original AsciiDoc source file |Name of target file to redirect to| Redirection file| Example pull request + +|`security-getting-started` +|`security-overview-concept` +|link:https://github.com/quarkusio/quarkusio.github.io/blob/develop/_redirects/guides/security-getting-started.md[`security-getting-started.md`] +|link:https://github.com/quarkusio/quarkusio.github.io/pull/1579[PR #1579] + +|=== == Preview and build Quarkus documentation -AsciiDoc syntax highlighting and the preview provided by an IDE may be enough for minor documentation changes. -For significant changes or updates to generated configuration documentation, -you should build the `docs` module and view resulting output before submitting your changes for review. +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 `docs` module locally and run the Vale linter as outlined in the following sections. + +=== Build the `docs` module locally include::{includes}/compile-quarkus-quickly.adoc[tag=quickly-install-docs] -This will produce: +Running `-DquicklyDocs` produces: - Generated AsciiDoc (`adoc` files) describing configuration properties in the `target/asciidoc/generated/config/` directory. - AsciiDoc output (`html` files) in the `docs/target/generated-docs/` directory. - YAML files containing metadata for all documents individually (`docs/target/indexByFile.yaml`) and grouped by document type (`target/indexByType.yaml`). - YAML files that list metadata errors by file (`docs/target/errorsByFile.yaml`) and by error type (`docs/target/errorsByType.yaml`) +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: [source,shell] @@ -60,10 +141,13 @@ When updating extension configuration: == Lint documentation changes with Vale -Our builds use https://vale.sh[Vale] to check grammar, style, and word usage in the English versions of our documents. -The configuration for vale is in the `docs/.vale` directory. +Our builds use https://vale.sh[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. -NOTE: The Vale configuration file is `docs/.vale/vale.ini`. +[NOTE] +==== +* The Quarkus configuration for Vale is in `docs/.vale.ini`. +* The Quarkus style rules are in YAML format in the `docs/.vale/styles` directory. +==== === Containerized Vale @@ -90,24 +174,27 @@ Include errors in the results. === Use the Vale CLI -If you install the https://vale.sh/docs/vale-cli/installation/[install the Vale CLI], you must specify the configuration file along with the directory or list of files to scan: +If you install the https://vale.sh/docs/vale-cli/installation/[Vale CLI], you must specify the configuration file and the directory or list of files to scan: [source,shell] ---- -vale --config=docs/.vale/vale.ini --minAlertLevel=warning docs/src/main/asciidoc +# 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 ---- -See the https://vale.sh/manual/[Vale CLI Manual] for details. +For more information, see the https://vale.sh/manual/[Vale CLI Manual]. === Vale IDE plugins -https://vale.sh/docs/integrations/guide/[Vale IDE integrations] rely on installation the Vale CLI. +https://vale.sh/docs/integrations/guide/[Vale IDE integrations] require the Vale CLI to be installed. -Each has it's own configuration requirements. The Visual Studio Code IDE extension, for example, requires two workspace settings: +Each IDE integration has its own configuration requirements. The Visual Studio Code IDE extension, for example, requires definition of the Vale CLI path: [source,json] ---- -"vale.valeCLI.config": "/path/to/quarkus/docs/.vale/vale.ini", "vale.valeCLI.path": "/path/to/vale" ---- @@ -120,7 +207,7 @@ Submit your proposed changes to the core Quarkus docs by {gh-pull-requests-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: +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: @@ -128,4 +215,23 @@ correcting the usage of a term, correcting a recurring error, or moving common c - 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. \ No newline at end of file +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 `needs-vale-rule-tweak`. + +== Previewing doc changes on the Quarkus website + +After your PR is merged to `main` and the branch is synchronized with the link:https://github.com/quarkusio/quarkusio.github.io/tree/develop/_generated-doc[Quarkus.io] website repository, you can preview the resulting build output on the link:https://quarkus.io/version/main/guides/[Main branch (SNAPSHOT)] documentation page of the Quarkus site. + +[IMPORTANT] +==== +The `main` branch of the `quarkus` repository is synchronized daily at 1AM GMT so you will not be able to preview your changes on link:https://quarkus.io/version/main/guides/[Main branch (SNAPSHOT)] until after the next site refresh occurs. +==== diff --git a/docs/src/main/asciidoc/doc-create-tutorial.adoc b/docs/src/main/asciidoc/doc-create-tutorial.adoc index c85a6c7b38e76..2fdfe4f9522a9 100644 --- a/docs/src/main/asciidoc/doc-create-tutorial.adoc +++ b/docs/src/main/asciidoc/doc-create-tutorial.adoc @@ -15,7 +15,7 @@ Create a new tutorial that guides users through creating, running, and testing a - Roughly 15 minutes - An editor or IDE that provides syntax highlighting and previews for AsciiDoc, either natively or using a plugin. - You should be familiar with the overview of what a xref:doc-concept.adoc#tutorial[Tutorial] is. -- Have the xref:doc-reference.adoc[Quarkus documentation reference] handy as a reference for required syntax and other conventions. +- Have the xref:doc-reference.adoc[Quarkus style and content guidelines] handy as a reference for required syntax and other conventions. :sectnums: :sectnumlevels: 3 diff --git a/docs/src/main/asciidoc/doc-reference.adoc b/docs/src/main/asciidoc/doc-reference.adoc index 103cfc7f591ee..d71bf0fd59972 100644 --- a/docs/src/main/asciidoc/doc-reference.adoc +++ b/docs/src/main/asciidoc/doc-reference.adoc @@ -4,11 +4,11 @@ and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// [id="doc-reference"] -= About Quarkus documentation += Quarkus style and content guidelines include::_attributes.adoc[] :categories: contributing -A detailed reference for the structure and composition of Quarkus documentation. +Guidelines are provided to help you to contribute clear and consistent content that is also sourced in the required structure and composition of Quarkus documentation. == AsciiDoc syntax @@ -139,39 +139,50 @@ Minimally, each document should define and id and a title, and include common at [source,asciidoc] ---- [id="doc-reference"] // <1> -= Quarkus documentation reference // <2> += Quarkus style and content guidelines // <2> \include::_attributes.adoc[] // <3> :categories: contributing // <4> ---- <1> Use the filename as the ID for the document. -<2> Define the document title following guidance in <> -<3> Include common document attributes -<4> Specify the relevant <> (comma separated) +<2> Define the document title following guidance in <>. +<3> Include common document attributes. +<4> Specify the relevant <> (comma separated). -==== Other common document attributes: +[[doc-header-optional]] +==== Other common document header attributes `:extension-status: preview`:: Use this attribute to flag special types of content. Valid values: `experimental`, `preview`, `stable` (not usually used), and `deprecated`. `:summary: `:: Use the summary to provide a concise (26 words or less) description of the document. -This attribute will be used in tiles or other descriptions on the website. If not present, the contents of the <> will be used instead. +The value of this attribute is used in tiles or other descriptions on the website and is not required in newer diataxis-styled docs, as outlined in <>. +If not present, the first sentence of the abstract is automatically used to generate the tile summary. -NOTE: Take care with whitespace when working with document-scoped attributes. The document header ends with the first blank line. +IMPORTANT: Take care with whitespace when working with document-scoped attributes. The document header ends with the first blank line. +[[abstracts-preamble]] === Abstracts (preamble) -Add a short description that helps your audience to quickly find and understand the purpose and intent of the page. +The first paragraph in the main body is treated as the abstract, also referred to as the preamble. +Add a short description that helps your audience quickly find and understand the purpose and intent of the page. +The first sentence of the abstract provides a summary and gets automatically added to the tile on the link:https://quarkus.io/guides/[Quarkus guides homepage]. Try to write the abstract by using the following guidelines: * *User oriented:* Contains terms and keywords that are familiar to users. -* *Concise:* Avoids self-referential expressions and filler words, for example, "This document..", "This tutorial..", or "The following.." +* *Concise:* Avoids self-referential expressions and filler words, for example: +** "This document.." +** "This tutorial..." +** "The following..." * *Brief:* Is no more than three sentences long. [IMPORTANT] ==== -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 link:https://quarkus.io/guides/[Quarkus guides homepage]. +Ensure that the first sentence explains the value and some benefits of the content in 26 words or less. ==== +If the first sentence is too long or can not be simplified to fit on the website tile, you can define a ``:summary:`` attribute in the document header attributes to serve that purpose. +For more information, see <>. + === Semantic line breaks :semantic-line-breaks: footnote:smbl[Rhodes, B. Semantic Linefeeds. https://rhodesmill.org/brandon/2012/one-sentence-per-line/] @@ -198,7 +209,7 @@ If you end up with deeply nested sections, think about the following: 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 reorganized to make it simpler to consume? -See xref:{doc-guides}/doc-concept.adoc[Quarkus documentation concepts] for more information about content types and organization. +See xref:{doc-guides}/doc-concept.adoc[Quarkus documentation content types] for more information about content types and organization. ==== === Links @@ -329,6 +340,7 @@ Quarkus documentation is grouped into the following categories. | integration | Support for integration extensions (Camel) | messaging | Integrations with messaging systems like Kafka, AMQP, or RabbitMQ. | miscellaneous | Miscellaneous +| native | Everything related to native executables | observability | Extensions and integrations for runtime and application observability | reactive | Extensions that support reactive technologies and techniques | security | Security diff --git a/docs/src/main/asciidoc/images/diataxis-framework.png b/docs/src/main/asciidoc/images/diataxis-framework.png new file mode 100644 index 0000000000000..dd5dd16d2b651 Binary files /dev/null and b/docs/src/main/asciidoc/images/diataxis-framework.png differ