diff --git a/config/legacy-url-mappings.yml b/config/legacy-url-mappings.yml index 4c9cb7369..812ea8658 100644 --- a/config/legacy-url-mappings.yml +++ b/config/legacy-url-mappings.yml @@ -1,4 +1,8 @@ +############################################# +# This file defines the legacy URL mappings for the documentation site. +# It maps current documentation pages to older versions to ensure users can find the content they need. # TODO: Refactor the model, for now we just use the first element as current version +############################################# stack: &stack [ '9.0+', '8.18', '8.17', '8.16', '8.15', '8.14', '8.13', '8.12', '8.11', '8.10', '8.9', '8.8', '8.7', '8.6', '8.5', '8.4', '8.3', '8.2', '8.1', '8.0', '7.17' ] diff --git a/config/navigation.yml b/config/navigation.yml index 36210388e..e00aa494f 100644 --- a/config/navigation.yml +++ b/config/navigation.yml @@ -1,9 +1,6 @@ ############################################# -# KEY FOR REFERENCE SECTION -# βœ… = toc should be ready to go! -# πŸ”œ = ready in a PR/branch, -# but needs to be approved and merged -# πŸ“ = no PR started yet +# This file defines the global navigation structure +# and content sources for the documentation site. ############################################# # Use sparingly, makes assembler aware of toc container folders @@ -219,7 +216,7 @@ toc: children: # Elasticsearch - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/elasticsearch/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/elasticsearch/toc.yml - toc: elasticsearch://reference/elasticsearch path_prefix: reference/elasticsearch # Children include: Configuration, JVM settings, Roles, @@ -227,93 +224,93 @@ toc: # REST APIs, Mapping, Elasticsearch audit events, Command line tools children: - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/aggregations/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/aggregations/toc.yml - toc: elasticsearch://reference/aggregations path_prefix: reference/aggregations # Processor reference - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/enrich-processor/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/enrich-processor/toc.yml - toc: elasticsearch://reference/enrich-processor path_prefix: reference/enrich-processor # Curator - # βœ… https://github.com/elastic/curator/blob/master/docs/reference/toc.yml + # https://github.com/elastic/curator/blob/master/docs/reference/toc.yml - toc: curator://reference path_prefix: reference/elasticsearch/curator # Children include the entire AsciiDoc book # Clients - # βœ… https://github.com/elastic/docs-content/blob/main/reference/elasticsearch-clients/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/elasticsearch-clients/toc.yml - toc: docs-content://reference/elasticsearch-clients path_prefix: reference/elasticsearch-clients children: # Eland - # βœ… https://github.com/elastic/eland/blob/main/docs/reference/toc.yml + # https://github.com/elastic/eland/blob/main/docs/reference/toc.yml - toc: eland://reference path_prefix: reference/elasticsearch/clients/eland # Children include the entire AsciiDoc book # Go - # βœ… https://github.com/elastic/go-elasticsearch/blob/main/docs/reference/toc.yml + # https://github.com/elastic/go-elasticsearch/blob/main/docs/reference/toc.yml - toc: go-elasticsearch://reference path_prefix: reference/elasticsearch/clients/go # Children include the entire AsciiDoc book # Java - # βœ… https://github.com/elastic/elasticsearch-java/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-java/blob/main/docs/reference/toc.yml - toc: elasticsearch-java://reference path_prefix: reference/elasticsearch/clients/java # Children include the entire AsciiDoc book # JavaScript - # βœ… https://github.com/elastic/elasticsearch-js/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-js/blob/main/docs/reference/toc.yml - toc: elasticsearch-js://reference path_prefix: reference/elasticsearch/clients/javascript # Children include the entire AsciiDoc book # .NET - # βœ… https://github.com/elastic/elasticsearch-net/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-net/blob/main/docs/reference/toc.yml - toc: elasticsearch-net://reference path_prefix: reference/elasticsearch/clients/dotnet # Children include the entire AsciiDoc book # PHP - # βœ… https://github.com/elastic/elasticsearch-php/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-php/blob/main/docs/reference/toc.yml - toc: elasticsearch-php://reference path_prefix: reference/elasticsearch/clients/php # Children include the entire AsciiDoc book # Python - # βœ… https://github.com/elastic/elasticsearch-py/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-py/blob/main/docs/reference/toc.yml - toc: elasticsearch-py://reference path_prefix: reference/elasticsearch/clients/python # Children include the entire AsciiDoc book # Ruby - # βœ… https://github.com/elastic/elasticsearch-ruby/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-ruby/blob/main/docs/reference/toc.yml - toc: elasticsearch-ruby://reference path_prefix: reference/elasticsearch/clients/ruby # Children include the entire AsciiDoc book # Rust - # βœ… https://github.com/elastic/elasticsearch-rs/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-rs/blob/main/docs/reference/toc.yml - toc: elasticsearch-rs://reference path_prefix: reference/elasticsearch/clients/rust # Children include the entire AsciiDoc book # Community-contributed clients - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/community-contributed/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/community-contributed/toc.yml - toc: elasticsearch://reference/community-contributed path_prefix: reference/elasticsearch/clients/community # Elasticsearch plugins - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/elasticsearch-plugins/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/elasticsearch-plugins/toc.yml - toc: elasticsearch://reference/elasticsearch-plugins path_prefix: reference/elasticsearch/plugins # Security - # βœ… https://github.com/elastic/docs-content/blob/main/reference/security/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/security/toc.yml - toc: docs-content://reference/security path_prefix: reference/security # Children include: Endpoint command reference, Elastic Defend, @@ -323,104 +320,104 @@ toc: path_prefix: reference/security/prebuilt-rules # Observability - # βœ… https://github.com/elastic/docs-content/blob/main/reference/observability/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/observability/toc.yml - toc: docs-content://reference/observability path_prefix: reference/observability # Children include: Fields and object schemas, Elastic Entity Model, # Infrastructure app fields # Elastic Distributions of OpenTelemetry (EDOT) - # βœ… https://github.com/elastic/opentelemetry/blob/main/docs/reference/toc.yml + # https://github.com/elastic/opentelemetry/blob/main/docs/reference/toc.yml - toc: opentelemetry://reference path_prefix: reference/opentelemetry # Children include all EDOT distribution docs. # Ingestion tools - # βœ… https://github.com/elastic/docs-content/blob/main/reference/ingestion-tools/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/ingestion-tools/toc.yml - toc: docs-content://reference/ingestion-tools path_prefix: reference/ingestion-tools children: # Fleet and Elastic Agent - # βœ… https://github.com/elastic/docs-content/blob/main/reference/fleet/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/fleet/toc.yml - toc: docs-content://reference/fleet path_prefix: reference/fleet # Children include the entire AsciiDoc book # APM - # βœ… https://github.com/elastic/docs-content/blob/main/reference/apm/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/apm/toc.yml - toc: docs-content://reference/apm path_prefix: reference/apm # Children include: APM settings, APM settings for Elastic Cloud, # APM settings for Elastic Cloud Enterprise children: # APM Attacher for Kubernetes - # βœ… https://github.com/elastic/apm-k8s-attacher/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-k8s-attacher/blob/main/docs/reference/toc.yml - toc: apm-k8s-attacher://reference path_prefix: reference/apm/k8s-attacher # Children include the entire AsciiDoc book # APM Architecture for AWS Lambda - # βœ… https://github.com/elastic/apm-aws-lambda/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-aws-lambda/blob/main/docs/reference/toc.yml - toc: apm-aws-lambda://reference path_prefix: reference/apm/aws-lambda # Children include the entire AsciiDoc book # APM agents - # βœ… https://github.com/elastic/docs-content/blob/main/reference/apm-agents/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/apm-agents/toc.yml - toc: docs-content://reference/apm-agents path_prefix: reference/apm-agents children: # APM .NET agent - # βœ… https://github.com/elastic/apm-agent-dotnet/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-dotnet/blob/main/docs/reference/toc.yml - toc: apm-agent-dotnet://reference path_prefix: reference/apm/agents/dotnet # Children include the entire AsciiDoc book # APM Go agent - # βœ… https://github.com/elastic/apm-agent-go/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-go/blob/main/docs/reference/toc.yml - toc: apm-agent-go://reference path_prefix: reference/apm/agents/go # Children include the entire AsciiDoc book # APM Java agent - # βœ… https://github.com/elastic/apm-agent-java/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-java/blob/main/docs/reference/toc.yml - toc: apm-agent-java://reference path_prefix: reference/apm/agents/java # Children include the entire AsciiDoc book # APM Node.js agent - # βœ… https://github.com/elastic/apm-agent-nodejs/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-nodejs/blob/main/docs/reference/toc.yml - toc: apm-agent-nodejs://reference path_prefix: reference/apm/agents/nodejs # Children include the entire AsciiDoc book # APM PHP agent - # βœ… https://github.com/elastic/apm-agent-php/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-php/blob/main/docs/reference/toc.yml - toc: apm-agent-php://reference path_prefix: reference/apm/agents/php # Children include the entire AsciiDoc book # APM Python agent - # βœ… https://github.com/elastic/apm-agent-python/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-python/blob/main/docs/reference/toc.yml - toc: apm-agent-python://reference path_prefix: reference/apm/agents/python # Children include the entire AsciiDoc book # APM Ruby agent - # βœ… https://github.com/elastic/apm-agent-ruby/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-ruby/blob/main/docs/reference/toc.yml - toc: apm-agent-ruby://reference path_prefix: reference/apm/agents/ruby # Children include the entire AsciiDoc book # APM RUM JavaScript agent - # βœ… https://github.com/elastic/apm-agent-rum-js/blob/main/docs/reference/toc.yml + # https://github.com/elastic/apm-agent-rum-js/blob/main/docs/reference/toc.yml - toc: apm-agent-rum-js://reference path_prefix: reference/apm/agents/rum-js # Children include the entire AsciiDoc book # Beats - # βœ… https://github.com/elastic/beats/blob/main/docs/reference/toc.yml + # https://github.com/elastic/beats/blob/main/docs/reference/toc.yml - toc: beats://reference path_prefix: reference/beats # Children include all entire AsciiDoc books: Beats, Auditbeat, @@ -428,7 +425,7 @@ toc: # Elastic logging plugin for Docker # Logstash - # βœ… https://github.com/elastic/logstash/blob/main/docs/reference/toc.yml + # https://github.com/elastic/logstash/blob/main/docs/reference/toc.yml - toc: logstash://reference path_prefix: reference/logstash # Children include the entire AsciiDoc book @@ -444,146 +441,146 @@ toc: # Children include the entire AsciiDoc book # Elastic Serverless Forwarder for AWS - # βœ… https://github.com/elastic/elastic-serverless-forwarder/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elastic-serverless-forwarder/blob/main/docs/reference/toc.yml - toc: elastic-serverless-forwarder://reference path_prefix: reference/aws-forwarder # Children include the entire AsciiDoc book # Search connectors - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/search-connectors/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/search-connectors/toc.yml - toc: elasticsearch://reference/search-connectors path_prefix: reference/search-connectors # Elasticsearch Hadoop - # βœ… https://github.com/elastic/elasticsearch-hadoop/blob/main/docs/reference/toc.yml + # https://github.com/elastic/elasticsearch-hadoop/blob/main/docs/reference/toc.yml - toc: elasticsearch-hadoop://reference path_prefix: reference/elasticsearch-hadoop # Children include the entire AsciiDoc book # Elastic Integrations - # βœ… https://github.com/elastic/integration-docs/blob/main/docs/reference/toc.yml + # https://github.com/elastic/integration-docs/blob/main/docs/reference/toc.yml - toc: integration-docs://reference path_prefix: reference/integrations # Children include the entire AsciiDoc book # Kibana - # βœ… https://github.com/elastic/kibana/blob/main/docs/reference/toc.yml + # https://github.com/elastic/kibana/blob/main/docs/reference/toc.yml - toc: kibana://reference path_prefix: reference/kibana # Children include the entire AsciiDoc book # (minus pages moved to docs-content) # Query languages - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/query-languages/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/query-languages/toc.yml - toc: elasticsearch://reference/query-languages path_prefix: reference/query-languages # Scripting languages - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/scripting-languages/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/scripting-languages/toc.yml - toc: elasticsearch://reference/scripting-languages path_prefix: reference/scripting-languages # ECS - # βœ… https://github.com/elastic/ecs/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs/blob/main/docs/reference/toc.yml - toc: ecs://reference path_prefix: reference/ecs # Children include the entire AsciiDoc book children: # ECS logging libraries - # βœ… https://github.com/elastic/ecs-logging/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging/blob/main/docs/reference/toc.yml - toc: ecs-logging://reference path_prefix: reference/ecs/logging children: # ECS Logging .NET - # βœ… https://github.com/elastic/ecs-dotnet/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-dotnet/blob/main/docs/reference/toc.yml - toc: ecs-dotnet://reference path_prefix: reference/ecs/logging/dotnet # Children include the entire AsciiDoc book # ECS Logging Go (Logrus) - # βœ… https://github.com/elastic/ecs-logging-go-logrus/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-go-logrus/blob/main/docs/reference/toc.yml - toc: ecs-logging-go-logrus://reference path_prefix: reference/ecs/logging/go-logrus # Children include the entire AsciiDoc book # ECS Logging Go (Zap) - # βœ… https://github.com/elastic/ecs-logging-go-zap/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-go-zap/blob/main/docs/reference/toc.yml - toc: ecs-logging-go-zap://reference path_prefix: reference/ecs/logging/go-zap # Children include the entire AsciiDoc book # ECS Logging Go (Zerolog) - # βœ… https://github.com/elastic/ecs-logging-go-zerolog/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-go-zerolog/blob/main/docs/reference/toc.yml - toc: ecs-logging-go-zerolog://reference path_prefix: reference/ecs/logging/go-zerolog # Children include the entire AsciiDoc book # ECS Logging Java - # βœ… https://github.com/elastic/ecs-logging-java/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-java/blob/main/docs/reference/toc.yml - toc: ecs-logging-java://reference path_prefix: reference/ecs/logging/java # Children include the entire AsciiDoc book # ECS Logging Node.js - # βœ… https://github.com/elastic/ecs-logging-nodejs/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-nodejs/blob/main/docs/reference/toc.yml - toc: ecs-logging-nodejs://reference path_prefix: reference/ecs/logging/nodejs # Children include the entire AsciiDoc book # ECS Logging PHP - # βœ… https://github.com/elastic/ecs-logging-php/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-php/blob/main/docs/reference/toc.yml - toc: ecs-logging-php://reference path_prefix: reference/ecs/logging/php # Children include the entire AsciiDoc book # ECS Logging Python - # βœ… https://github.com/elastic/ecs-logging-python/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-python/blob/main/docs/reference/toc.yml - toc: ecs-logging-python://reference path_prefix: reference/ecs/logging/python # Children include the entire AsciiDoc book # ECS Logging Ruby - # βœ… https://github.com/elastic/ecs-logging-ruby/blob/main/docs/reference/toc.yml + # https://github.com/elastic/ecs-logging-ruby/blob/main/docs/reference/toc.yml - toc: ecs-logging-ruby://reference path_prefix: reference/ecs/logging/ruby # Children include the entire AsciiDoc book # Data analysis - # βœ… https://github.com/elastic/docs-content/blob/main/reference/data-analysis/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/data-analysis/toc.yml - toc: docs-content://reference/data-analysis path_prefix: reference/data-analysis children: - # βœ… https://github.com/elastic/elasticsearch/blob/main/docs/reference/text-analysis/toc.yml + # https://github.com/elastic/elasticsearch/blob/main/docs/reference/text-analysis/toc.yml - toc: elasticsearch://reference/text-analysis path_prefix: reference/text-analysis # Search UI - # βœ… https://github.com/elastic/search-ui/blob/main/docs/reference/toc.yml + # https://github.com/elastic/search-ui/blob/main/docs/reference/toc.yml - toc: search-ui://reference path_prefix: reference/search-ui # Children include the entire AsciiDoc book # Cloud - # βœ… https://github.com/elastic/cloud/blob/master/docs/reference/toc.yml + # https://github.com/elastic/cloud/blob/master/docs/reference/toc.yml - toc: cloud://reference path_prefix: reference/cloud # Children include Elastic Cloud Enterprise, Elastic Cloud Hosted children: # Elastic Cloud on Kubernetes - # βœ… https://github.com/elastic/cloud-on-k8s/blob/main/docs/reference/toc.yml + # https://github.com/elastic/cloud-on-k8s/blob/main/docs/reference/toc.yml - toc: cloud-on-k8s://reference path_prefix: reference/cloud-on-k8s # Children include the entire AsciiDoc book # (minus pages moved to docs-content) # Elastic cloud control (ECCTL) - # βœ… https://github.com/elastic/ecctl/blob/master/docs/reference/toc.yml + # https://github.com/elastic/ecctl/blob/master/docs/reference/toc.yml - toc: ecctl://reference path_prefix: reference/ecctl # Children include the entire AsciiDoc book # (minus pages moved to docs-content) # Glossary - # βœ… https://github.com/elastic/docs-content/blob/main/reference/glossary/toc.yml + # https://github.com/elastic/docs-content/blob/main/reference/glossary/toc.yml - toc: docs-content://reference/glossary path_prefix: reference/glossary diff --git a/docs/_docset.yml b/docs/_docset.yml index 58475f7ef..a09f0def2 100644 --- a/docs/_docset.yml +++ b/docs/_docset.yml @@ -37,6 +37,7 @@ toc: - file: cumulative-docs.md - file: branching-strategy.md - file: add-repo.md + - file: release-new-version.md - folder: migration children: - file: index.md @@ -64,8 +65,9 @@ toc: children: - file: index.md - file: content.md - - file: landing-page.md - - file: redirects.md + - file: navigation.md + - file: versions.md + - file: legacy-url-mappings.md - folder: content-set children: - file: index.md diff --git a/docs/configure/content-sources.md b/docs/configure/content-sources.md index 9c1f41960..7c068fb65 100644 --- a/docs/configure/content-sources.md +++ b/docs/configure/content-sources.md @@ -23,55 +23,28 @@ This allows you as an owner of a repository to choose two different branching st The new documentation system supports 2 branching strategies. -Continuous deployment -: This is the default where a repositories `main` or `master` branch is continuously deployed to production. +### Continuous deployment -Tagged -: Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production. - Allowing you to control the timing of when new documentation should go live. +This is the default where a repositories `main` or `master` branch is continuously deployed to production. +### Tagged -### Continuous deployment - -This is the default. To get started, follow our [guide](/migration/guide/index.md) to set up the new docs folder structure and CI configuration. - -Once setup ensure the repository is added to our [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) under `references`. - -For example say you want to onboard `elastic/my-repository` into the production build: - -```yaml -references: - my-repository: -``` - -Is equivalent to specifying. +Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production. Allowing you to control the timing of when new documentation should go live. -```yaml -references: - my-repository: - next: main - current: main -``` +### Add a new content set -% TODO we need navigation.yml docs -Once the repository is added, its navigation still needs to be injected into to global site navigation. +To get started: -### Tagged +1. Follow our [guide](/migration/guide/index.md) to set up the new docs folder structure and CI configuration. +1. Configure the repository source in `assembler.yml`. See [](./site/content.md) for details. -If you want to have more control over the timing of when your docs go live to production. Configure the repository -in our [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) to have a fixed git reference (typically a branch) deploy the `current` content source to production. - -```yaml -references: - my-other-repository: - next: main - current: 9.0 -``` + :::{note} + The tagged branching strategy requires first following our [migration guide](/migration/guide/index.md) and configuring the documentation CI integration. + Our CI integration checks will block until `current` is successfully configured. + ::: -:::{note} -In order for `9.0` to be onboarded it needs to first follow our [migration guide](/migration/guide/index.md) and have our documentation CI integration setup. -Our CI integration checks will block until `current` is successfully configured -::: +1. Inject the content set into the global navigation. See [](./site/navigation.md) for details. +1. Optionally set up legacy URL mappings. See [](./site/legacy-url-mappings.md) for details. #### CI configuration diff --git a/docs/configure/site/content.md b/docs/configure/site/content.md index 582187af6..ea344a713 100644 --- a/docs/configure/site/content.md +++ b/docs/configure/site/content.md @@ -1,55 +1,100 @@ +--- +navigation_title: assembler.yml +--- + # `assembler.yml` -The global navigation is defined in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file. This file can roughly be thought of as the V3 equivalent of conf.yaml in the asciidoc build system. This file, which writers own, allows for arbitrary nesting of `docset.yml` and `toc.yml` references. This file will live in the `elastic/docs-content` repository, but will not build or have any influence over the `docs-builder` builds in that repo. +The [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file defines the global documentation site: -The global navigation that is defined in [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) can be composed of three main resources: -1. Local TOC files: toc.yml files that live in the docs-content repository. -2. External TOC files: A subset of a content set (represented by a toc.yml file) that is external to the docs-content repository. -3. External content set declarations: An entire docset.yml file that is external to the docs-content repository. +* `environments` +* `shared_configuration` +* narrative repository configuration +* reference repository configurations -The [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file might look something like this: +## `environments` -```yaml +This section defines different build environments for the documentation site. + +Each environment specifies configuration details such as the site URI, content source, path prefix, Google Tag Manager settings, and feature flags. + +Example: + +```yml +environments: + prod: + uri: https://www.elastic.co + path_prefix: docs + content_source: current + allow_indexing: true + google_tag_manager: + enabled: true + id: GTM-KNJMG2M +``` + +## `shared_configuration` +This section defines YAML anchors for common settings shared among multiple repositories and deployment environments. + +The following example sets a unique `stack` version for each of the three defined deployment environments: + +```yml + stack: &stack + current: 9.0 + next: 9.1 + edge: main ``` -## Assembler constraints +## `narrative` -To maintain each docset’s immutability and self-containment, resources in the global navigation (assembler.yml) must follow specific rules. -1. A link resource can appear only once in the global navigation, and it must nest directly under another resource (not under individual pages from a different content set). In other words: - 1. Each docset.yml or toc.yml file can appear only once in the overall navigation. - 1. Any TOC declarationsβ€”whether in docset.yml or toc.ymlβ€”must be placed either at the top level or directly under another TOC entry, with no individual files in between. -1. Nested resources must appear either before or after (default) the parent’s TOC, and they cannot be placed arbitrarily among the parent’s pages (e.g., between two files of the parent). -1. If an external TOC is linked, all of its child TOCs must also be included in the global navigation. +Configures the main `docs-content` repository. -## AsciiDoctor conf.yml +Example: + +```yml +narrative: + checkout_strategy: full +``` -In the AsciiDoctor-powered site, content configuration at the site level is done in the [`conf.yaml`](https://github.com/elastic/docs/blob/master/conf.yaml) file in the elastic/docs repo. In the `conf.yml` file, the configuration information for all books are listed in this one file. Here's the example of what it looks like to configure a single book: +## `references` + +Configures all other repositories whose docs content should be included or referenced in the build. Each can have custom settings for branch, checkout method, etc. + +Example: + +```yml +references: + apm-server: +``` + +### Branching strategy + +How you add a reference repository depends on its [branching strategy](../content-sources.md#branching-strategies). + +#### Continuous deployment repository + +To add a continuous deployment repository, define the name of the repository: ```yaml -- title: Machine Learning - prefix: en/machine-learning - current: *stackcurrent - index: docs/en/stack/ml/index.asciidoc - branches: [ {main: master}, 8.9, 8.8, 8.7, 8.6, 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.17, 7.16, 7.15, 7.14, 7.13, 7.12, 7.11, 7.10, 7.9, 7.8, 7.7, 7.6, 7.5, 7.4, 7.3, 7.2, 7.1, 7.0, 6.8, 6.7, 6.6, 6.5, 6.4, 6.3 ] - live: *stacklive - chunk: 1 - tags: Elastic Stack/Machine Learning - subject: Machine Learning - sources: - - - repo: stack-docs - path: docs/en/stack - - - repo: elasticsearch - path: docs - - - repo: docs - path: shared/versions/stack/{version}.asciidoc - - - repo: docs - path: shared/attributes.asciidoc - - - repo: docs - path: shared/settings.asciidoc +references: + my-repository: ``` + +The above configuration is equivalent to specifying. + +```yaml +references: + my-repository: + next: main + current: main +``` + +### Tagged repository + +To add a tagged repository, configure the repo to have a fixed git reference (typically a branch) deploy the `current` content source to production. + +```yaml +references: + my-other-repository: + next: main + current: 9.0 +``` \ No newline at end of file diff --git a/docs/configure/site/index.md b/docs/configure/site/index.md index b18464a61..1728bad3e 100644 --- a/docs/configure/site/index.md +++ b/docs/configure/site/index.md @@ -4,41 +4,17 @@ navigation_title: Site-level # Site-level configuration -Start by understanding how the new V3 system works at the site level compared to how our custom AsciiDoctor system works. At the site-level, we have: +Configure the documentation site in these files: -| System property | Asciidoc | V3 | -| -------------------- | -------------------- | -------------------- | -| **Content sources** --> Collections of markup files containing doc content. These are split up across many docs repos. | _Books_ | _Content sets_ | -| **Content configuration** --> A way to specify where to find those content sources, and in what order they should be added to the site. | Configuration file ([`conf.yml`](https://github.com/elastic/docs/blob/master/conf.yaml) in elastic/docs) | Config file `assembler.yml` | - -Where these pieces live and what format they are in varies between the two systems, but they generally achieve the same goal. - -## Content sources - -TBD - -## Content configuration - -In both the AsciiDoctor- and V3-based system, there is site-wide configuration where you list all content sources, where to find those sources, and in what order they should be added to the site. - -In the AsciiDoctor system, this all happens in one YAML file in the `/docs` repo. In the V3 system: -* Content configuration happens in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file in `docs-builder`. -* Navigation configuration happens in the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file in `docs-builder`. - -[assembler.yml](./content.md) - -## Landing page - -See [landing page](./landing-page.md) +- [](./content.md) - build environments and repository sources +- [](./navigation.md) - global navigation index +- [](./versions.md) - global versioning schemes +- [](./legacy-url-mappings.md) - supported legacy version ## Redirects -Plan still needed +Redirects are also configured at the site-level. See [](../../contribute/redirects.md) for more information. ## V3 site-level diagram -DIAGRAM NEEDED - -## Asciidoc site-level diagram - -![site-level config in the asciidoc system](./img/site-level-asciidoctor.png) +*Coming soon* diff --git a/docs/configure/site/landing-page.md b/docs/configure/site/landing-page.md deleted file mode 100644 index b38ab0c5c..000000000 --- a/docs/configure/site/landing-page.md +++ /dev/null @@ -1,3 +0,0 @@ -# Landing page - -The landing page will initially be an HTML template. To update the landing page, you will directly edit the HTML template. Eventually, we will templetize the landing page for easier updates. diff --git a/docs/configure/site/legacy-url-mappings.md b/docs/configure/site/legacy-url-mappings.md new file mode 100644 index 000000000..11ab0a221 --- /dev/null +++ b/docs/configure/site/legacy-url-mappings.md @@ -0,0 +1,24 @@ +# Legacy URL mappings + +This [`legacy-url-mappings.yml`](https://github.com/elastic/docs-builder/blob/main/config/legacy-url-mappings.yml) file manages legacy URL patterns for Elastic documentation, mapping the path of each legacy build URL to a list of documentation versions. It ensures that users can easily find previous versions of our documentation. + +This example maps documentation that references `elastic.co/guide/en/elasticsearch/reference/ to Elastic Stack versioned URL paths: + +```yml +en/elasticsearch/reference/: *stack +``` + +## Structure + +`stack anchor` +: Defines a reusable list of version strings for "stack" projects, e.g., [ '9.0+', '8.18', ... ]. + +`mappings` +: A YAML mapping where each key is a legacy documentation URL path (like `en/apm/agent/java/`) and the value is a list of asciidoc versions that exist for that path. + +:::{important} +The first version in the `mappings` list is treated as the "current" version in documentation version dropdown. +::: + +## Example entry + diff --git a/docs/configure/site/navigation.md b/docs/configure/site/navigation.md new file mode 100644 index 000000000..ea2619575 --- /dev/null +++ b/docs/configure/site/navigation.md @@ -0,0 +1,41 @@ +# `navigation.yml` + +The [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file acts as a global navigation index. Each entry points to a `toc.yml` file, which contains the navigation tree for that section. This design allows each section/project/team to manage its own navigation independently of other content sets. + +Example: + +```yml +toc: + - toc: get-started # No toc.yml indicates a docs-content directory + - toc: extend + children: + - toc: kibana://extend # A toc.yml file in the Kibana repo at docs/extend + path_prefix: extend/kibana # The URL path for built content will be elastic.co/docs/extend/kibana/FILE_PATH+NAME +``` + +## `toc` + +The location of the table of contents file. + +`repo_name://path-relative-to-toc.yml` + +## `path_prefix` (optional) + +The `path_prefix` configuration key specifies the URL path segment that should be prefixed to all documentation URLs. + + listing all documentation sources and the corresponding `toc.yml` file that defines their navigation. + + + table of roots and specifying the location of each documentation section’s table of contents (toc.yml) file. Every entry in navigation.yml must reference a toc.yml file, which actually defines the navigation structure for that documentation section. + + + +defines the structure and organization of the navigation menu for the Elastic documentation site. + +The file is composed of nested YAML objects, where each object represents a navigation node. Navigation nodes can be categories, sections, or links to documentation pages. + + + + +% TODO we need [`navigation.yml](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml`) docs +Once the repository is added, its navigation still needs to be injected into to global site navigation. \ No newline at end of file diff --git a/docs/configure/site/redirects.md b/docs/configure/site/redirects.md deleted file mode 100644 index 46d0da0df..000000000 --- a/docs/configure/site/redirects.md +++ /dev/null @@ -1,24 +0,0 @@ -# Redirects - -## From an elastic.co/guide page - -The web team owns redirects for `elastic.co`. Writers do not have direct access to the system where www.elastic.co redirects are managed. - -### Permanent redirect - -Currently the only way to implement true redirects from a page on `elastic.co/guide` is to open an issue with the web team, add your request to a Google Sheet, and wait for the web team to address your request. - -### Stopgap - -Writers have developed a stopgap to communicate to users that content has been removed or moved to another location. We create a page at the existing URL that links to the new location of the information. This is better than removing a page without redirecting at all, but is not the best user experience and doesn't align with SEO best practices. - -## From an elastic.co/docs page - -STRATEGY TBD - -## Migration redirects - -* Docs inventory script: https://github.com/elastic/docs-helpers/tree/main/docs-inventory -* Docs inventory sheet: https://docs.google.com/spreadsheets/d/1LfPI3TZqdpONGxOmL8B8V-Feo1flLwObz9_ibCEMkIQ/edit?gid=605983744#gid=605983744 - -This sheet will be used to request redirects after migration from 8.current to 9.current. \ No newline at end of file diff --git a/docs/configure/site/versions.md b/docs/configure/site/versions.md new file mode 100644 index 000000000..53121f1cc --- /dev/null +++ b/docs/configure/site/versions.md @@ -0,0 +1,19 @@ +# `versions.yml` + +The [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml) file specifies which versions of each product should be recognized as the minimum (base) and the latest (current) in documentation builds. + +This example sets the Elastic Stack base and current versions while also assigning them to a variable that can be accessed with `*stack` + +```yml +versioning_systems: + stack: &stack + base: 9.0 + current: 9.0.4 +``` + +Versions set in this file are surfaced to the user via `applies_to` tags. + +:::{include} /contribute/_snippets/tag-processing.md +::: + +See [](../../contribute/cumulative-docs.md) for more information. \ No newline at end of file diff --git a/docs/contribute/add-repo.md b/docs/contribute/add-repo.md index 3009122f8..b5d34a59f 100644 --- a/docs/contribute/add-repo.md +++ b/docs/contribute/add-repo.md @@ -58,7 +58,7 @@ references: In this file, you can optionally specify custom branches to deploy docs from, depending on your preferred [branching strategy](branching-strategy.md). You might want to change your branching strategy so you can have more control over when content added for a specific release is published. ::: -Then, edit the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file to add the repository to the navigation. +Then, edit the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file to add the repository to the navigation. Refer to [navigation.yml](../configure/site/navigation.md) for more information. For example, to add the `elastic/yadda-docs` repository under **Reference**: @@ -76,6 +76,21 @@ For example, to add the `elastic/yadda-docs` repository under **Reference**: ``` :::: + +::::{step} (Optional) Add a new version scheme + +If you're adding a product with a new versioning scheme, edit the [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml) file to add the versioning scheme to the build. Refer to [navigation.yml](../configure/site/versions.md) for more information. + +For example, to add version 13.5 of yadda-docs: + +```yml + yadda-docs: + base: 13.0 + current: 13.5 +``` + +:::: + ::::: ## Add .artifacts to .gitignore diff --git a/docs/contribute/redirects.md b/docs/contribute/redirects.md index 3857ace38..086d3a811 100644 --- a/docs/contribute/redirects.md +++ b/docs/contribute/redirects.md @@ -1,28 +1,32 @@ --- navigation_title: "Redirects" --- -# Adding redirects to link resolving -If you [move files around](move.md) or simply need to delete a few pages you might end up in a chicken-and-egg situation. The files you move or delete might still be linked to by other [documentation sets](../configure/content-set/index.md). +# Manage redirects across doc sets -Redirects allow you to force other documentation sets to resolve old links to their new location. -This allows you to publish your changes and work to update the other documentation sets. +When you [move](move.md) or delete pages, other [documentation sets](../configure/content-set/index.md) might still link to them. This can lead to a chicken-and-egg problem: you can't publish your changes without breaking links elsewhere. -:::{note} -The source and target URLs must both be within Elastic Docs V3. -You cannot use this process to redirect to [API docs](https://www.elastic.co/docs/api/), for example. -::: +Redirects let you map old links to new targets across documentation sets, so you can publish changes while updating other doc sets. + +## Limitations + +Redirects only work within Elastic Docs V3 content sets. You cannot use this method to redirect to external destinations like [API docs](https://www.elastic.co/docs/api/). + +For API redirects, consult with the documentation engineering team on Slack (#elastic-docs-v3). + +For elastic.co/guide redirects, open a [web team request](http://ela.st/web-request). ## File location. -The file should be located next to your `docset.yml` file +Redirects are configured at the content set-level. +The configuration file should be located next to your `docset.yml` file: * `redirects.yml` if you use `docset.yml` * `_redirects.yml` if you use `_docset.yml` ## Syntax -A full overview of the syntax, don't worry we'll zoom after! +Example syntax: ```yaml redirects: @@ -66,8 +70,7 @@ redirects: ### Redirect preserving all anchors -This will rewrite `4th-page.md#anchor` to `5th-page#anchor` while still validating the -anchor is valid like normal. +This example redirects `4th-page.md#anchor` to `5th-page.md#anchor`: ```yaml redirects: @@ -75,23 +78,24 @@ redirects: ``` ### Redirect stripping all anchors -Here both `9th-page.md` and `7th-page.md` redirect to `5th-page.md` but the crosslink resolver -will strip any anchors on `9th-page.md` and `7th-page.md`. - -:::{note} -The following two are equivalent. The `!` prefix provides a convenient shortcut -::: +This example strips all anchors from the source page. +Any remaining links resolving to anchors on `7th-page.md` will fail link validation. ```yaml -redirects: - 'testing/redirects/9th-page.md': '!testing/redirects/5th-page.md' +redirects 'testing/redirects/7th-page.md': to: 'testing/redirects/5th-page.md' anchors: '!' ``` -A special case is redirecting to the page itself when a section gets removed/renamed. -In which case `to:` can simply be omitted +Alternate syntax: + +```yaml +redirects: + 'testing/redirects/7th-page.md': '!testing/redirects/5th-page.md' +``` + +To handle removed anchors on a page that still exists, omit the `to:` field: ```yaml 'testing/redirects/third-page.md': @@ -99,15 +103,13 @@ In which case `to:` can simply be omitted 'removed-anchor': ``` -### Redirect renaming anchors - -* `first-page-old.md#old-anchor` will redirect to `second-page.md#active-anchor` -* `first-page-old.md#removed-anchor` will redirect to `second-page.md` +### Redirect with renamed anchors -Any anchor not listed will be forwarded and validated e.g; +This example redirects: -* `first-page-old.md#another-anchor` will redirect to `second-page.md#another-anchor` and validate - `another-anchor` exists in `second-page.md` +- `first-page-old.md#old-anchor` β†’ `second-page.md#active-anchor` +- `first-page-old.md#removed-anchor` β†’ `second-page.md` +- Any other anchor is passed through and validated normally. ```yaml redirects: @@ -120,9 +122,7 @@ redirects: ### Redirecting to other repositories -It is possible to redirect to other repositories. The syntax is the same as when linking on documentation sets: - -* 'other-repo://reference/section/new-cross-repo-page.md' +Use the `repo://path/to/page.md` syntax to redirect across repositories. ```yaml redirects: diff --git a/docs/contribute/release-new-version.md b/docs/contribute/release-new-version.md new file mode 100644 index 000000000..56cb0496d --- /dev/null +++ b/docs/contribute/release-new-version.md @@ -0,0 +1,62 @@ +# Release a new documentation version + +When a new version of the Elastic Stack (or another versioned product) is released, the docs site must be updated to recognize it. This process primarily involves updating version metadata in the shared site configuration. + +Follow these steps to release a new documentation version. + +:::::{stepper} + +::::{step} Update `versions.yml` + +The `versions.yml` file defines the **base** (minimum) and **current** (latest) versions of each versioned product family. + +Example: + +```yaml +versioning_systems: + stack: &stack + base: 9.0 + current: 9.1.0 +``` + +- Update the `current` version to reflect the newly released version. +- Only update the `base` version if you're dropping support for an older version. + +Refer to [`versions.yml`](../configure/site/versions.md) for more information. + +:::: + +::::{step} (Optional) Update legacy URL mappings + +If you're releasing a version older than the current `base`, or restoring support for a previously removed version, you may need to update the `legacy-url-mappings.yml` file. + +This file maps legacy URL paths (like `en/elasticsearch/reference/`) to the list of versions that exist at that path. + +For example, to release the 8.19 version of the Elastic Stack, update the `stack` versions array to include the new version number: + +```yml +- stack: &stack [ '9.0+', '8.19', '8.18', '8.17', ... ] +``` + +:::{important} +The first version in the `mappings` list is treated as the "current" version in documentation version dropdown. +::: + +See [`legacy-url-mappings.yml`](../configure/site/legacy-url-mappings.md) for more information. + +:::: + +::::{step} Release a new version of docs-builder + +Version updates and content set additions require a release of docs-builder. +Contact the Docs Eng team for assistance. + +:::: + +::::{step} Confirm `applies_to` metadata + +Cumulative documentation relies on version metadata through `applies_to` blocks, which use version definitions in `versions.yml`. + +Check the built output to ensure `applies_to` changes are correctly rendering. + +:::: diff --git a/docs/syntax-docs-builder.zip b/docs/syntax-docs-builder.zip new file mode 100644 index 000000000..622c8c3ae Binary files /dev/null and b/docs/syntax-docs-builder.zip differ