Skip to content

Commit

Permalink
Docs/update shortcode syntax (#6279)
Browse files Browse the repository at this point in the history
* Update generation source

* Update generated doc content

* Update shortcode syntax for notes, tips, warnings, and cautions

* Update the param shortcode syntax
  • Loading branch information
clayton-cornell authored Jan 31, 2024
1 parent 62530fb commit 1def38f
Show file tree
Hide file tree
Showing 158 changed files with 671 additions and 914 deletions.
10 changes: 4 additions & 6 deletions docs/generator/links_to_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ func (l *LinksToTypesGenerator) Generate() (string, error) {
}

note := `
{{% admonition type="note" %}}
Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.
{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}
`

return heading + acceptingSection + outputSection + note, nil
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Grafana Agent is based around **components**. Components are wired together to
form programmable observability **pipelines** for telemetry collection,
processing, and delivery.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
This page focuses mainly on [Flow mode](https://grafana.com/docs/agent/<AGENT_VERSION>/flow/), the Terraform-inspired variant of Grafana Agent.

For information on other variants of Grafana Agent, refer to [Introduction to Grafana Agent]({{< relref "./about.md" >}}).
{{% /admonition %}}
{{< /admonition >}}

Grafana Agent can collect, transform, and send data to:

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/_index.md.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Grafana Agent is based around **components**. Components are wired together to
form programmable observability **pipelines** for telemetry collection,
processing, and delivery.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
This page focuses mainly on [Flow mode](https://grafana.com/docs/agent/<AGENT_VERSION>/flow/), the Terraform-inspired variant of Grafana Agent.

For information on other variants of Grafana Agent, refer to [Introduction to Grafana Agent]({{< relref "./about.md" >}}).
{{% /admonition %}}
{{< /admonition >}}

Grafana Agent can collect, transform, and send data to:

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ You should run Static mode when:

### Static mode Kubernetes operator

{{% admonition type="note" %}}
{{< admonition type="note" >}}
Grafana Agent version 0.37 and newer provides Prometheus Operator compatibility in Flow mode.
You should use Grafana Agent Flow mode for all new Grafana Agent deployments.
{{% /admonition %}}
{{< /admonition >}}

The [Static mode Kubernetes operator][] is a variant of Grafana Agent introduced on June 17, 2021. It's currently in beta.

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ prometheus.remote_write "default" {

The {{< param "PRODUCT_NAME" >}} [configuration generator](https://grafana.github.io/agent-configurator/) will help you get a head start on creating flow code.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
This feature is experimental, and it doesn't support all River components.
{{% /admonition %}}
{{< /admonition >}}

## Next steps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ If the key isn't a valid identifier, you must wrap it in double quotes like a st
}
```

{{% admonition type="note" %}}
{{< admonition type="note" >}}
Don't confuse objects with blocks.

* An _object_ is a value assigned to an [Attribute][]. You **must** use commas between key-value pairs on separate lines.
* A [Block][] is a named structural element composed of multiple attributes. You **must not** use commas between attributes.

[Attribute]: {{< relref "../syntax.md#Attributes" >}}
[Block]: {{< relref "../syntax.md#Blocks" >}}
{{% /admonition %}}
{{< /admonition >}}

## Functions

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/concepts/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Module loader components are responsible for the following functions:

Module loaders are typically called `module.LOADER_NAME`.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
Some module loaders may not support running modules with arguments or exports.
{{% /admonition %}}
{{< /admonition >}}

Refer to [Components][] for more information about the module loader components.

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/get-started/install/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ The following architectures are supported:
- macOS: AMD64 (Intel), ARM64 (Apple Silicon)
- FreeBSD: AMD64

{{% admonition type="note" %}}
{{< admonition type="note" >}}
Installing {{< param "PRODUCT_NAME" >}} on other operating systems is possible, but isn't recommended or supported.
{{% /admonition %}}
{{< /admonition >}}

{{< section >}}

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/flow/get-started/install/chef.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can use Chef to install and manage {{< param "PRODUCT_NAME" >}}.

## Steps

To add {{% param "PRODUCT_NAME" %}} to a host:
To add {{< param "PRODUCT_NAME" >}} to a host:

1. Add the following resources to your [Chef][] recipe to add the Grafana package repositories to your system:

Expand Down
8 changes: 4 additions & 4 deletions docs/sources/flow/get-started/install/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ Replace the following:
You can modify the last line to change the arguments passed to the {{< param "PRODUCT_NAME" >}} binary.
Refer to the documentation for [run][] for more information about the options available to the `run` command.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
Make sure you pass `--server.http.listen-addr=0.0.0.0:12345` as an argument as shown in the example above.
If you don't pass this argument, the [debugging UI][UI] won't be available outside of the Docker container.
{{% /admonition %}}
{{< /admonition >}}

## Run a Windows Docker container

Expand All @@ -82,10 +82,10 @@ Replace the following:
You can modify the last line to change the arguments passed to the {{< param "PRODUCT_NAME" >}} binary.
Refer to the documentation for [run][] for more information about the options available to the `run` command.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
Make sure you pass `--server.http.listen-addr=0.0.0.0:12345` as an argument as shown in the example above.
If you don't pass this argument, the [debugging UI][UI] won't be available outside of the Docker container.
{{% /admonition %}}
{{< /admonition >}}

## Verify

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/get-started/install/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ weight: 200

## Deploy

{{% admonition type="note" %}}
{{< admonition type="note" >}}
These instructions show you how to install the generic [Helm chart](https://github.com/grafana/agent/tree/main/operations/helm/charts/grafana-agent) for {{< param "PRODUCT_NAME" >}}.
You can deploy {{< param "PRODUCT_ROOT_NAME" >}} either in static mode or flow mode. The Helm chart deploys {{< param "PRODUCT_NAME" >}} by default.
{{% /admonition %}}
{{< /admonition >}}

To deploy {{< param "PRODUCT_ROOT_NAME" >}} on Kubernetes using Helm, run the following commands in a terminal window:

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/get-started/install/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ weight: 400

You can install {{< param "PRODUCT_NAME" >}} on macOS with Homebrew .

{{% admonition type="note" %}}
{{< admonition type="note" >}}
The default prefix for Homebrew on Intel is `/usr/local`. The default prefix for Homebrew on Apple Silicon is `/opt/Homebrew`. To verify the default prefix for Homebrew on your computer, open a terminal window and type `brew --prefix`.
{{% /admonition %}}
{{< /admonition >}}

## Before you begin

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/get-started/run/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ Replace the following:

You can set up and manage the standalone binary for {{< param "PRODUCT_NAME" >}} as a Linux systemd service.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
These steps assume you have a default systemd and {{< param "PRODUCT_NAME" >}} configuration.
{{% /admonition %}}
{{< /admonition >}}

1. To create a new user called `grafana-agent-flow` run the following command in a terminal window:

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/reference/cli/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ weight: 400

The `tools` command contains command line tooling grouped by Flow component.

{{% admonition type="caution" %}}
{{< admonition type="caution" >}}
Utilities in this command have no backward compatibility
guarantees and may change or be removed between releases.
{{% /admonition %}}
{{< /admonition >}}

## Subcommands

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/reference/compatibility/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ This section provides an overview of _some_ of the possible connections between

For each common data type, we provide a list of compatible components that can export or consume it.

{{% admonition type="note" %}}
{{< admonition type="note" >}}
The type of export may not be the only requirement for chaining components together.
The value of an attribute may matter as well as its type.
Refer to each component's documentation for more details on what values are acceptable.

For example:
* A Prometheus component may always expect an `"__address__"` label inside a list of targets.
* A `string` argument may only accept certain values like "traceID" or "spanID".
{{% /admonition %}}
{{< /admonition >}}

## Targets

Expand Down
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.consul.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.consulagent.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.dockerswarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.ec2.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.eureka.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.file.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
10 changes: 4 additions & 6 deletions docs/sources/flow/reference/components/discovery.gce.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ Replace the following:

- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}})

{{% admonition type="note" %}}

Connecting some components may not be sensible or components may require further configuration to make the
connection work correctly. Refer to the linked documentation for more details.

{{% /admonition %}}
{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
Loading

0 comments on commit 1def38f

Please sign in to comment.