Skip to content

Commit

Permalink
chore(docs): make YAML appear first in the example configurations (ve…
Browse files Browse the repository at this point in the history
  • Loading branch information
pront committed Aug 22, 2023
1 parent 61c0ae8 commit 85dd439
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Vector's pipeline model is based on a [directed acyclic graph][dag] of [componen

## Defining pipelines

A Vector pipeline is defined through a TOML, YAML, or JSON [configuration] file. For maintainability, many Vector users use configuration and data templating languages like [Jsonnet] or [CUE].
A Vector pipeline is defined through a YAML, TOML, or JSON [configuration] file. For maintainability, many Vector users use configuration and data templating languages like [Jsonnet] or [CUE].

Configuration is checked at pipeline compile time (when Vector boots). This prevents simple mistakes and enforces DAG properties.

Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/reference/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ environment variable example.

### Formats

Vector supports [TOML], [YAML], and [JSON] to ensure that Vector fits into your
Vector supports [YAML], [TOML], and [JSON] to ensure that Vector fits into your
workflow. A side benefit of supporting YAML and JSON is that they enable you to use
data templating languages such as [ytt], [Jsonnet] and [Cue].

Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference.cue
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ _values: {
Config format | Example
:-------------|:-------
[TOML](\(urls.toml)) | `condition = ".status == 200"`
[YAML](\(urls.yaml)) | `condition: .status == 200`
[TOML](\(urls.toml)) | `condition = ".status == 200"`
[JSON](\(urls.json)) | `"condition": ".status == 200"`
"""
}
Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference/administration/management.cue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ administration: management: {
variables: {
variants?: [string, ...string]

config_formats: ["toml", "yaml", "json"]
config_formats: ["yaml", "toml", "json"]
}

manage?: {
Expand Down
28 changes: 14 additions & 14 deletions website/cue/reference/cli.cue
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ cli: {
type: "string"
env_var: "VECTOR_CONFIG_DIR"
}
"config-yaml": {
description: env_vars.VECTOR_CONFIG_YAML.description
type: "string"
env_var: "VECTOR_CONFIG_YAML"
}
"config-toml": {
description: env_vars.VECTOR_CONFIG_TOML.description
type: "string"
Expand All @@ -146,11 +151,6 @@ cli: {
type: "string"
env_var: "VECTOR_CONFIG_JSON"
}
"config-yaml": {
description: env_vars.VECTOR_CONFIG_YAML.description
type: "string"
env_var: "VECTOR_CONFIG_YAML"
}
"graceful-shutdown-limit-secs": {
description: env_vars.VECTOR_GRACEFUL_SHUTDOWN_LIMIT_SECS.description
default: env_vars.VECTOR_GRACEFUL_SHUTDOWN_LIMIT_SECS.type.uint.default
Expand Down Expand Up @@ -200,7 +200,7 @@ cli: {
You can also visualize the output online at [webgraphviz.com](http://www.webgraphviz.com/).
"""

example: "vector graph --config /etc/vector/vector.toml | dot -Tsvg > graph.svg"
example: "vector graph --config /etc/vector/vector.yaml | dot -Tsvg > graph.svg"

options: _core_options
}
Expand Down Expand Up @@ -333,8 +333,8 @@ cli: {
type: "enum"
default: "json"
enum: {
json: "Output events as JSON"
yaml: "Output events as YAML"
json: "Output events as JSON"
logfmt: "Output events as logfmt"
}
}
Expand Down Expand Up @@ -416,24 +416,24 @@ cli: {
}

options: {
"config-toml": {
"config-yaml": {
description: """
Any number of Vector config files to validate.
TOML file format is assumed.
YAML file format is assumed.
"""
type: "string"
}
"config-json": {
"config-toml": {
description: """
Any number of Vector config files to validate.
JSON file format is assumed.
TOML file format is assumed.
"""
type: "string"
}
"config-yaml": {
"config-json": {
description: """
Any number of Vector config files to validate.
YAML file format is assumed.
JSON file format is assumed.
"""
type: "string"
}
Expand Down Expand Up @@ -537,7 +537,7 @@ cli: {
Read configuration from one or more files. Wildcard paths are supported. If no files are
specified the default config path `/etc/vector/vector.toml` is targeted. TOML, YAML and
JSON file formats are supported. The format to interpret the file with is determined from
the file extension (`.toml`, `.yaml`, `.json`). Vector falls back to TOML if it can't
the file extension (`.yaml`, `.toml`, `.json`). Vector falls back to YAML if it can't
detect a supported format.
"""
type: string: {
Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference/configuration.cue
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ configuration: {
formats: {
title: "Formats"
body: """
Vector supports [TOML](\(urls.toml)), [YAML](\(urls.yaml)), and [JSON](\(urls.json)) to
Vector supports [YAML](\(urls.yaml)), [TOML](\(urls.toml)), and [JSON](\(urls.json)) to
ensure Vector fits into your workflow. A side benefit of supporting YAML and JSON is that they
enable you to use data templating languages such as [ytt](\(urls.ytt)), [Jsonnet](\(urls.jsonnet)) and
[Cue](\(urls.cue)).
Expand Down
2 changes: 1 addition & 1 deletion website/layouts/partials/blog/authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
</a>
{{ end }}
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions website/layouts/partials/components/example-configs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $examples := .examples }}
{{ $levels := slice "common" "advanced" }}
{{ $formats := slice "toml" "yaml" "json" }}
{{ $formats := slice "yaml" "toml" "json" }}
<div x-data="{ level: 'common', format: $store.global.format }" class="no-prose mb-4 border dark:border-gray-700 rounded-md shadow py-4 px-6">
<span>
{{ partial "heading.html" (dict "text" "Example configurations" "level" 3) }}
Expand Down Expand Up @@ -34,4 +34,4 @@
{{ end }}
</div>
{{ end }}
</div>
</div>
4 changes: 2 additions & 2 deletions website/layouts/partials/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@

{{/* Source/transform/sink examples */}}
{{ with .component_examples }}
{{ $formats := slice "toml" "yaml" "json" }}
{{ $formats := slice "yaml" "toml" "json" }}
{{ $defaultFormat := index $formats 0 }}
<div class="no-prose flex flex-col divide-y dark:divide-gray-700">
{{ range . }}
Expand Down Expand Up @@ -2193,7 +2193,7 @@ <h3 id="{{ $code }}">
{{ partial "heading.html" (dict "text" .title "level" 4) }}
</span>

{{ $formats := slice "toml" "yaml" "json" }}
{{ $formats := slice "yaml" "toml" "json" }}
<div class="flex space-x-2">
{{ range $formats }}
<button @click="$store.global.setFormat('{{ . }}')"
Expand Down

0 comments on commit 85dd439

Please sign in to comment.