mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
This PR: - Updates the Kibana [Alert and action settings](https://www.elastic.co/guide/en/kibana/current/alert-action-settings-kb.html) page to be based off of a YAML source file (`/docs/settings-gen/source/kibana-alert-action-settings.yml`) that is manually converted to Asciidoc format (`kibana-alert-action-settings.asciidoc`) by means of a Perl script (`docs/settings-gen/parse-settings.pl`). A preview of the new, generated page is [here](https://kibana_bk_191787.docs-preview.app.elstc.co/guide/en/kibana/master/alert-action-settings-kb.html). - Adds the `docs/settings-gen/parse-settings.pl` script which does the YAML → Asciidoc conversion. All new files are added to the `/docs/source-gen` folder. This is a trial run updating only one page of settings in the docs. Later, in separate PRs, we plan to convert other pages. After all Kibana settings pages have been converted, we would ask that the Perl script be run automatically as part of the CI whenever the YAML files in `/docs/source-gen` are added or updated. **Notes:** - The Docs team is happy to own and maintain the Perl script (sorry to use Perl - it's the only scripting language that I know). - In time we also plan to convert all of these files from Asciidoc to Markdown. - When we eventually/hopefully get the rest of the Kibana settings files converted, we will announce the settings doc process to the Kibana team by email and/or in the Kibana newsletter. Big thanks to the amazing @lukeelmers and @KOTungseth for guiding this! --- Why are we doing this? We aim to: - Create a more consistent appearance for settings across all of the docs. - Make it easier for people to contribute, since all Asciidoc/Markdown formatting is handled by a script. - Make it more apparent which settings may be missing info, such as the default values, available options, etc. --- P.S. I haven't worked in the Kibana repo very much and would appreciate any help navigating the CI checks. Rel: https://github.com/elastic/docs-projects/issues/239 |
||
---|---|---|
.. | ||
source | ||
parse-settings.pl | ||
readme.md |
YAML-based settings documentation
We're aiming to update the Kibana configuration settings pages to be based off of YAML-formatted source files. The approach has the advantages that:
- The YAML format makes it easier to add new settings and update existing ones. The setting data is separate from almost all formatting, whether Asciidoc or (future) Markdown.
- The HTML files will have a more consistent and user-friendly appearance.
- The YAML format makes it easier for teams to identify missing settings or settings that are lacking details that should be made available in the docs.
The YAML settings files in the settings-gen/source
folder are converted to Asciidoc source, located in the same directory, by means of the parse-settings.pl
Perl script. Please do not update the generated Asciidoc files directly as your changes will be overwritten. Please make any required docs changes in the <name>-settings.yml
files.
Following is a schema for all available properties in a YAML settings file.
Schema
product: REQUIRED e.g. Elasticsearch, Kibana, Enterprise Search
collection: REQUIRED e.g. Alerting and action settings in Kibana
page_description: |
OPTIONAL
Multiline string. Can include tables, lists, code examples, etc.
groups:
- group: REQUIRED e.g. Preconfigured connector settings
id: REQUIRED The ID used for documentation links, e.g., general-alert-action-settings
# description: |
OPTIONAL
Multiline string. Can include tables, lists, code examples, etc.
# example: |
OPTIONAL
Multiline string.
Can include tables, lists, code examples, etc.
settings:
- setting: REQUIRED e.g. xpack.encryptedSavedObjects.encryptionKey
# id: OPTIONAL ID used for documentation links, e.g., xpack-encryptedsavedobjects-encryptionkey
description: |
REQUIRED
Multiline string. Can include tables, lists, code examples, etc.
# state: OPTIONAL One of deprecated/hidden/tech-preview
# deprecation_details: "" OPTIONAL
# note: "" OPTIONAL
# tip: "" OPTIONAL
# warning: "" OPTIONAL
# important: "" OPTIONAL
# datatype: REQUIRED One of string/bool/int/float/enum. For enum include the supported 'options', below.
# default: OPTIONAL
# options:
# - option: OPTIONAL
# description: "" OPTIONAL
# type: OPTIONAL ONe of static/dynamic
# platforms: OPTIONAL, list each supported platform
# - cloud
# - serverless
# - self-managed
# example: |
OPTIONAL
Multiline string. Can include tables, lists, code examples, etc.