From 1ae3646cd942c04e4c3e75ea318daae6e3674259 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 7 Jan 2021 17:45:30 +0100 Subject: [PATCH 01/11] Support multiple versions of the documentation --- _config.yml | 10 + _data/guides-1-7.yaml | 441 +++++++++++++++++++ _data/{guides.yaml => guides-latest.yaml} | 0 _data/versions.yaml | 3 +- _guides/attributes.adoc | 2 +- _guides/guides.md | 1 + _layouts/base.html | 8 +- _layouts/guides-index.html | 22 +- _plugins/regex_filter.rb | 12 + _sass/core/global.scss | 3 + _sass/layouts/guides.scss | 12 + assets/javascript/guides-version-dropdown.js | 9 + robots.txt | 2 + 13 files changed, 518 insertions(+), 7 deletions(-) create mode 100644 _data/guides-1-7.yaml rename _data/{guides.yaml => guides-latest.yaml} (100%) create mode 100644 _plugins/regex_filter.rb create mode 100644 assets/javascript/guides-version-dropdown.js create mode 100644 robots.txt diff --git a/_config.yml b/_config.yml index 28b5e24ab3..0105457385 100755 --- a/_config.yml +++ b/_config.yml @@ -40,6 +40,9 @@ collections: redirects: output: true permalink: /:path/ + versions: + output: true + permalink: /version/:path # Exclude from processing. # The following items will not be processed, by default. Create a custom list @@ -71,6 +74,13 @@ defaults: values: layout: "guides" permalink: /guides/:name + - + scope: + path: "" # an empty string here means all files in the project + type: "versions" + values: + layout: "guides" + permalink: /version/:path - scope: type: "posts" diff --git a/_data/guides-1-7.yaml b/_data/guides-1-7.yaml new file mode 100644 index 0000000000..b727061465 --- /dev/null +++ b/_data/guides-1-7.yaml @@ -0,0 +1,441 @@ +--- # document start + +categories: + - category: Core + cat-id: core + guides: + - title: Configuring Your Application + url: /guides/config + description: Hardcoded values in your code is a no go (even if we all did it at some point ;-)). In this guide, we learn how to configure your application. + - title: All Configuration Properties + url: /guides/all-config + description: List all the configuration properties per extensions + - title: Application Initialization and Termination + url: /guides/lifecycle + description: You often need to execute custom actions when the application starts and clean up everything when the application stops. This guide explains how to be notified when an application stops or starts. + - title: Introduction to CDI + url: /guides/cdi + description: Quarkus DI solution is based on the [Contexts and Dependency Injection for Java 2.0](https://docs.jboss.org/cdi/spec/2.0/cdi-spec) specification. This guide explains the basics of CDI. + - title: CDI Reference + url: /guides/cdi-reference + description: Go more in depth into the Quarkus implementation of CDI. + - title: Testing Your Application + url: /guides/getting-started-testing + description: | + This guide covers: + + * Testing in JVM mode + * Testing in native mode + * Injection of resources into tests + - title: Configuring Logging + url: /guides/logging + description: This guide explains logging and how to configure it. + - title: Command Mode Reference + url: /guides/command-mode-reference + description: This reference guide explains how to develop command line applications with Quarkus. + - title: Using SSL With Native Images + url: /guides/native-and-ssl + description: In this guide, we will discuss how you can get your native images to support SSL, as native images don't support it out of the box. + - title: Context Propagation + url: /guides/context-propagation + description: Learn more about how you can pass contextual information with our implementation of MicroProfile Context Propagation. + - title: Writing Native Applications + url: /guides/writing-native-applications-tips + description: This guide is a collection of tips to help you solve the problems you encounter when compiling applications to native executable. + - category: Web + cat-id: web + guides: + - title: Writing REST JSON Services + url: /guides/rest-json + description: JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads. + - title: Writing Simple REST CRUD Services + url: /guides/rest-data-panache + description: Hibernate ORM REST Data with Panache simplifies the creation of CRUD applications based on JAX-RS and Hibernate ORM. + - title: Validation with Hibernate Validator + url: /guides/validation + description: This guide covers how to use Hibernate Validator/Bean Validation in your REST services. + - title: Using the REST Client (including JSON) + url: /guides/rest-client + description: This guide explains how to use the MicroProfile REST Client in order to interact with REST APIs (JSON and other) with very little effort. + - title: Using the REST Client with Multipart + url: /guides/rest-client-multipart + description: This guide explains how to use the MicroProfile REST Client to send multipart REST requests, typically to upload documents. + - title: Using JWT RBAC + url: /guides/security-jwt + description: This guide explains how your application can utilize MicroProfile JWT RBAC to provide secured access to the JAX-RS endpoints. + - title: Using WebSockets + url: /guides/websockets + description: This guide explains how your Quarkus application can utilize web sockets to create interactive web applications. Because it’s the canonical web socket application, we are going to create a simple chat application. + - title: Using OpenAPI and Swagger UI + url: /guides/openapi-swaggerui + description: This guide explains how to use the OpenAPI extension to generate an OpenAPI descriptor and get a Swagger UI frontend to test your REST endpoints. + - title: HTTP Reference Documentation + url: /guides/http-reference + description: Learn more about configuring Quarkus' Vert.x based HTTP layer - and Undertow if you are using servlets. + - title: Using Fault Tolerance + url: /guides/microprofile-fault-tolerance + description: This guide demonstrates how your Quarkus application can utilize the MicroProfile Fault Tolerance specification through the SmallRye Fault Tolerance extension. + - title: Using Reactive Routes + url: /guides/reactive-routes + description: This guide demonstrates how to use reactive routes. + - title: Consuming and Implementing GraphQL Services + url: /guides/microprofile-graphql + description: This guide explains how to leverage Eclipse MicroProfile GraphQL to consume and implement GraphQL services. + - category: Data + cat-id: data + guides: + - title: Configuring your datasources + url: /guides/datasource + description: With Quarkus, you can easily configure a datasource, or several if need be. + - title: Using Hibernate ORM and JPA + url: /guides/hibernate-orm + description: Hibernate ORM is the de facto JPA implementation and offers you the full breath of an Object Relational Mapper. It works beautifully in Quarkus. + - title: Simplified Hibernate ORM with Panache + url: /guides/hibernate-orm-panache + description: | + Hibernate ORM is the de facto JPA implementation and offers you the full breadth of an Object Relational Mapper. + + It makes complex mappings possible, but it does not make simple and common mappings trivial. + + Panache focuses on making your entities trivial and fun to write. + - title: Simplified Hibernate ORM with Panache and Kotlin + url: /guides/hibernate-orm-panache-kotlin + description: This explain the specifics of using Hibernate ORM with Panache in a Kotlin project. + - title: Hibernate Search + Elasticsearch + url: /guides/hibernate-search-elasticsearch + description: Hibernate Search allows you to index your entities in an Elasticsearch cluster and easily offer full text search in all your Hibernate ORM-based applications. + - title: Using Transactions + url: /guides/transaction + description: | + Quarkus comes with a Transaction Manager and uses it to coordinate and expose transactions to your applications. + Each extension dealing with persistence will integrate with it for you. + And you will explicitly interact with transactions via CDI. + This guide will walk you through all that. + - title: Using Blaze-Persistence + url: /guides/blaze-persistence + description: This guide explains how to use Blaze-Persistence to simplify your data and DTO layers. + - title: Validation with Hibernate Validator + url: /guides/validation + description: This guide covers how to use Hibernate Validator/Bean Validation in your REST services. + - title: Cache your application data + url: /guides/cache + description: This guide explains how to cache expensive method calls of your CDI beans using simple annotations. + - title: Schema Migration with Flyway + url: /guides/flyway + description: This guide covers how to use the Flyway extension to manage your schema migrations. + - title: Schema Migration with Liquibase + url: /guides/liquibase + description: This guide covers how to use the Liquibase extension to manage your schema migrations. + - title: Using Infinispan Client + url: /guides/infinispan-client + description: Infinispan is an in memory data grid that allows running in a server outside of application processes. This extension provides functionality to allow the client that can connect to said server when running in Quarkus. + - title: Reactive SQL Clients + url: /guides/reactive-sql-clients + description: This guide covers how to use the Reactive SQL Clients for MySQL and PostgreSQL in Quarkus. + - title: Elasticsearch Clients + url: /guides/elasticsearch + description: This guide covers how to use an Elasticsearch cluster using the low level or high level REST clients. + - title: MongoDB Client + url: /guides/mongodb + description: This guide covers how to use MongoDB in Quarkus. + - title: MongoDB with Panache + url: /guides/mongodb-panache + description: This guide covers the usage of MongoDB using active records and repositories. + - title: Redis Client + url: /guides/redis + description: This guide covers how to use a Redis datastore in Quarkus. + - title: Neo4j Client + url: /guides/neo4j + description: This guide covers how to use the Neo4j graph database in Quarkus. + - title: Apache Cassandra Client + url: /guides/cassandra + description: This guide covers how to use the Apache Cassandra NoSQL database in Quarkus. + - title: Amazon DynamoDB + url: /guides/amazon-dynamodb + description: This guide covers how to use the Amazon DynamoDB database in Quarkus. + - title: Amazon S3 + url: /guides/amazon-s3 + description: This guide covers how to use the Amazon S3 cloud storage in Quarkus. + - title: Using Software Transactional Memory + url: /guides/software-transactional-memory + description: This guides covers the usage of Software Transactional Memory (STM) + - category: Messaging + cat-id: messaging + guides: + - title: Using Apache Kafka + url: /guides/kafka + description: This guide demonstrates how your Quarkus application can utilize MicroProfile Reactive Messaging to interact with Apache Kafka. + - title: Using AMQP with Reactive Messaging + url: /guides/amqp + description: This guide demonstrates how your Quarkus application can utilize MicroProfile Reactive Messaging to interact with AMQP. + - title: Using Apache Kafka Streams + url: /guides/kafka-streams + description: This guide demonstrates how your Quarkus application can utilize the Apache Kafka Streams API to implement stream processing applications based on Apache Kafka. + - title: Using the event bus + url: /guides/reactive-event-bus + description: This guide explains how different beans can interact using the event bus. + - title: Using JMS + url: /guides/jms + description: This guide demonstrates how your Quarkus application can use JMS messaging with AMQP 1.0 using Apache Qpid JMS, or using Apache ActiveMQ Artemis JMS. + + - category: Security + cat-id: security + guides: + - title: Security Architecture and Guides + url: /guides/security + description: This guide is the entry point for everything security in Quarkus. + - category: Business Automation + cat-id: business-automation + guides: + - title: Using Kogito to add business automation capabilities to an application + url: /guides/kogito + description: This guide demonstrates how your Quarkus application can use Kogito to add business automation to power it up with business processes and rules. + - title: Using AI to optimize a schedule with OptaPlanner + url: /guides/optaplanner + description: This guide walks you through the process of creating a Quarkus application with OptaPlanner's constraint solving Artificial Intelligence (AI). + - category: Integration + cat-id: integration + guides: + - title: Apache Camel + url: /guides/camel + description: This guide covers the systems integration with Apache Camel + - category: Command Line Applications + cat-id: command-line + guides: + - title: Command Mode Reference + url: /guides/command-mode-reference + description: This reference guide explains how to develop command line applications with Quarkus. + - title: Picocli + url: /guides/picocli + description: Simplify command line applications creation with the Picocli extension. + - category: Cloud + cat-id: cloud + guides: + - title: Build Container Images + url: /guides/container-image + description: Learn how to build and push container images with Jib, S2I or Docker as part of the Quarkus build. + - title: Deploying Quarkus Applications on Kubernetes + url: /guides/deploying-to-kubernetes + description: This guide covers how to deploy a native application on Kubernetes. + - title: Deploying Quarkus Applications on OpenShift + url: /guides/deploying-to-openshift + description: This guide covers how to deploy a native application on OpenShift. + - title: Consuming Kubernetes ConfigMaps + url: /guides/kubernetes-config + description: Use ConfigMaps as a configuration source for your Quarkus applications. + - title: Using the Kubernetes Client to Interact with a Kubernetes Cluster + url: /guides/kubernetes-client + description: This guide demonstrates how to use the Fabric8 Kubernetes client to interact with your Kubernetes cluster. + - title: Deploying to Microsoft Azure Cloud + url: /guides/deploying-to-azure-cloud + description: This guide explains how to deploy a Quarkus application to Microsoft Azure Cloud. + - title: Azure Functions (Serverless) with Vert.x Web, Servlet, or RESTEasy + url: /guides/azure-functions-http + description: This guide explains how you can deploy Vert.x Web, Servlet, or RESTEasy microservices as an Azure Function. + - title: Amazon Lambda + url: /guides/amazon-lambda + description: This guide explains how you can deploy Quarkus-based Amazon Lambdas. + - title: Amazon Lambda with Vert.x Web, Servlet, or RESTEasy + url: /guides/amazon-lambda-http + description: This guide explains how you can deploy Vert.x Web, Servlet, or RESTEasy microservices as an Amazon Lambda. + - title: Google Cloud Functions + url: /guides/gcp-functions + description: This guide explains how you can deploy Quarkus-based Google Cloud Functions. + - title: Google Cloud Functions with Vert.x Web, Servlet, or RESTEasy + url: /guides/gcp-functions-http + description: This guide explains how you can deploy Vert.x Web, Servlet, or RESTEasy microservices as a Google Cloud Function. + - title: Quarkus Funqy + url: /guides/funqy + description: This guide explains basics of the Funqy framework, a simple portable cross-provider cloud function API. + - title: Quarkus Funqy HTTP + url: /guides/funqy-http + description: This guide explains Funqy's HTTP binding + - title: Quarkus Funqy Amazon Lambdas + url: /guides/funqy-amazon-lambda + description: This guide explains Funqy's Amazon Lambda binding + - title: Quarkus Funqy Amazon Lambdas HTTP + url: /guides/funqy-amazon-lambda-http + description: This guide explains Funqy's Amazon Lambda HTTP binding + - title: Quarkus Funqy Knative Events + url: /guides/funqy-knative-events + description: This guide explains Funqy's Knative Events binding + - title: Quarkus Funqy Azure Functions HTTP + url: /guides/funqy-azure-functions-http + description: This guide explains Funqy's Azure Functions HTTP binding + - title: Quarkus Funqy Google Cloud Platform + url: /guides/funqy-gcp-functions + description: This guide explains Funqy's Google Cloud Platform binding + - title: Amazon DynamoDB + url: /guides/amazon-dynamodb + description: This guide covers how to use the Amazon DynamoDB database in Quarkus. + - title: Amazon KMS + url: /guides/amazon-kms + description: This guide covers how to use the Amazon Key Management Service in Quarkus. + - title: Amazon S3 + url: /guides/amazon-s3 + description: This guide covers how to use the Amazon S3 cloud storage in Quarkus. + - title: Amazon SES + url: /guides/amazon-ses + description: This guide covers how to use the Amazon Simple Email Service in Quarkus. + - title: Amazon SNS + url: /guides/amazon-sns + description: This guide covers how to use the Amazon Simple Notification Service in Quarkus. + - title: Amazon SQS + url: /guides/amazon-sqs + description: This guide covers how to use the Amazon Simple Queue Service in Quarkus. + - category: Observability + cat-id: observability + guides: + - title: Using Health Check + url: /guides/microprofile-health + description: This guide demonstrates how your Quarkus application can utilize the MicroProfile Health specification through the SmallRye Health extension. + - title: Using OpenTracing + url: /guides/opentracing + description: This guide explains how your Quarkus application can utilize OpenTracing to provide distributed tracing for interactive web applications. + - title: Collecting Metrics + url: /guides/microprofile-metrics + description: This guide demonstrates how your Quarkus application can utilize the MicroProfile Metrics specification through the SmallRye Metrics extension. + - title: Using Fault Tolerance + url: /guides/microprofile-fault-tolerance + description: This guide demonstrates how your Quarkus application can utilize the MicroProfile Fault Tolerance specification through the SmallRye Fault Tolerance extension. + - title: Using Sentry to Monitor your Logs + url: /guides/logging-sentry + description: This guide explains how to use Sentry to monitor your application and be notified when exceptions occur. + - title: Centralized Log Management + url: /guides/centralized-log-management + description: This guide explains how to centralize your logs with Logstash or Fluentd using the Graylog Extended Log Format (GELF). + - category: Serialization + cat-id: serialization + guides: + - title: Writing REST JSON Services + url: /guides/rest-json + description: JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads. + - title: Getting Started with gRPC + url: /guides/grpc-getting-started + description: This guide explains how to start using gRPC in your Quarkus application. + - title: Implementing gRPC Services + url: /guides/grpc-service-implementation + description: This guide explains how to implement gRPC services in your Quarkus application. + - title: Consuming gRPC Services + url: /guides/grpc-service-consumption + description: This guide explains how to consume gRPC services in your Quarkus application. + - category: Tooling + cat-id: tooling + guides: + - title: Building Applications with Maven + url: /guides/maven-tooling + description: | + This guide covers: + + * Maven configuration + * Creating a new project + * Dealing with extensions + * Development mode + * Debugging + * Import in your IDE + * Building a native image + * Build a container friendly executable + - title: Building Applications with Gradle + url: /guides/gradle-tooling + description: | + This guide covers: + + * Gradle configuration + * Creating a new project + * Dealing with extensions + * Development mode + * Debugging + * Import in your IDE + * Building a native image + * Build a container friendly executable + - title: Measuring the coverage of your tests + url: /guides/tests-with-coverage + description: This guide explains how to measure the test coverage of your Quarkus application. + - category: Compatibility + cat-id: compatibility + guides: + - title: Using the Quarkus Extension for Spring DI API + url: /guides/spring-di + description: While you are encouraged to use CDI annotations for injection, Quarkus provides a compatibility layer for Spring dependency injection in the form of the spring-di extension. + - title: Using the Quarkus Extension for Spring Web API + url: /guides/spring-web + description: While you are encouraged to use JAX-RS annotations for defining REST endpoints, Quarkus provides a compatibility layer for Spring Web in the form of the spring-web extension. + - title: Using the Quarkus Extension for Spring Data JPA API + url: /guides/spring-data-jpa + description: While you are encouraged to use Hibernate ORM with Panache for your data layer, Quarkus provides a compatibility layer for Spring Data JPA in the form of the spring-data-jpa extension. + - title: Using the Quarkus Extension for Spring Security API + url: /guides/spring-security + description: While you are encouraged to use the Quarkus security layer to secure your applications, Quarkus provides a compatibility layer for Spring Security in the form of the spring-security extension. + - title: Using the Quarkus Extension for Spring Cache + url: /guides/spring-cache + description: While you are encouraged to use the Cache extension for your application-level caching, Quarkus provides a compatibility layer for Spring Cache in the form of the spring-cache extension. + - title: Using the Quarkus Extension for Spring Scheduled + url: /guides/spring-scheduled + description: While you are encouraged to use the Scheduler or Quartz extensions to schedule tasks, Quarkus provides a compatibility layer for Spring Scheduled in the form of the spring-scheduled extension. + - title: Using Spring Boot's ConfigurationProperties + url: /guides/spring-boot-properties + description: Use Spring Boot's `@ConfigurationProperties` in place of MicroProfile Config annotations + - title: Using the Quarkus Extension for Spring Cloud Config + url: /guides/spring-cloud-config-client + description: Quarkus provides a compatibility layer for Spring Cloud Config in the form of the spring-cloud-config-client extension. + - category: Miscellaneous + cat-id: miscellaneous + guides: + - title: Scheduling Periodic Tasks + url: /guides/scheduler + description: Modern applications often need to run specific tasks periodically. In this guide, you learn how to schedule periodic tasks. + - title: Scheduler Reference + url: /guides/scheduler-reference + description: Learn more about the Scheduler extension. + - title: Scheduling Clustered Tasks with Quartz + url: /guides/quartz + description: You need clustering support for your scheduled tasks? This guide explains how to use the Quartz extension for that. + - title: Sending Emails + url: /guides/mailer + description: Learn more about how you can send email from a Quarkus application with our reactive email client. + - title: Templating with Qute + url: /guides/qute + description: Learn more about how you can use templating in your applications with the Qute template engine. + - title: Qute Reference Guide + url: /guides/qute-reference + description: Learn everything you need to know about the Qute template engine. + - title: Extracting Content with Apache Tika + url: /guides/tika + description: Learn more about how you extract content from documents using the Apache Tika toolkit. + - title: Using Vert.x + url: /guides/vertx + description: This guide explains how to use Vert.x in Quarkus to build reactive applications. + - title: Access Git repositories with JGit + url: /guides/jgit + description: This guide explains how you can access Git repositories with JGit. + - title: Consume Configuration from Consul + url: /guides/consul-config + description: This guide explains how your Quarkus application can read configuration properties at runtime from Consul. + - title: Measuring Performance + url: /guides/performance-measure + description: This guide explains how to best measure the footprint of a Quarkus application. + - category: Alternative Languages + cat-id: alternative-languages + guides: + - title: Using Kotlin + url: /guides/kotlin + description: This guide explains how to use Kotlin. + - title: Simplified Hibernate ORM with Panache and Kotlin + url: /guides/hibernate-orm-panache-kotlin + description: This explain the specifics of using Hibernate ORM with Panache in a Kotlin project. + - category: Writing Extensions + cat-id: writing-extensions + guides: + - title: Building My First Extension + url: building-my-first-extension + description: Learn step by step how to build a simple extension. + - title: Writing Your Own Extension + url: /guides/writing-extensions + description: | + Quarkus extensions optimize your applications by pushing as much work as possible to the build operation. This guide explains the rationale of Quarkus extensions and guides you through authoring your own extensions. + - title: Writing Native Applications + url: /guides/writing-native-applications-tips + description: This guide is a collection of tips to help you solve the problems you encounter when compiling applications to native executable. + - title: Class Loading Reference + url: /guides/class-loading-reference + description: Learn more about Quarkus class loading infrastructure. diff --git a/_data/guides.yaml b/_data/guides-latest.yaml similarity index 100% rename from _data/guides.yaml rename to _data/guides-latest.yaml diff --git a/_data/versions.yaml b/_data/versions.yaml index aa885b03d6..61ff19ddb2 100644 --- a/_data/versions.yaml +++ b/_data/versions.yaml @@ -4,4 +4,5 @@ quarkus: graalvm: 21.0.0 jdk: "8 or 11+" maven: 3.6.2+ - +documentation: + - 1.7 diff --git a/_guides/attributes.adoc b/_guides/attributes.adoc index 9e9b5735e1..974e25ba11 100644 --- a/_guides/attributes.adoc +++ b/_guides/attributes.adoc @@ -10,7 +10,7 @@ :restassured-version: 4.3.3 :gradle-version: 6.8.3 -:generated-dir: ../_generated-config +:generated-dir: ../_generated-config/latest :quarkus-home-url: https://quarkus.io :quarkus-site-getting-started: /get-started :quarkus-writing-extensions-guide: /guides/writing-extensions diff --git a/_guides/guides.md b/_guides/guides.md index f56a2c63d1..3f222768f8 100644 --- a/_guides/guides.md +++ b/_guides/guides.md @@ -2,4 +2,5 @@ layout: guides-index title: Quarkus - Guides permalink: /guides/ +docversion: latest --- diff --git a/_layouts/base.html b/_layouts/base.html index 04b1678e5b..f53927ddbf 100755 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -19,7 +19,12 @@ - + {% if page.layout == 'guides' or page.layout == 'guides-index' %} + {%assign canonical_url = page.url | replace_regex: '^/version/[^/]+', '' %} + {% else %} + {%assign canonical_url = page.url %} + {% endif %} + @@ -49,6 +54,7 @@ + diff --git a/_layouts/guides-index.html b/_layouts/guides-index.html index 0184e4e971..6205663fa3 100644 --- a/_layouts/guides-index.html +++ b/_layouts/guides-index.html @@ -3,11 +3,20 @@ --- {% include back-to-top.html %} +{% assign data_source = "guides-" | append: page.docversion | replace: '.', '-' %}
-
+

{{page.title}}

+
+ +
@@ -37,7 +46,7 @@

View Category:

    - {% for item in site.data.guides.categories %} + {% for item in site.data[data_source].categories %}
  • {{ item.category }}
  • @@ -46,13 +55,18 @@

    View Category: