From a9bec7945ed9c081e9cf42c1587a7b607fe85acb Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 25 Mar 2021 14:02:21 +0100 Subject: [PATCH] remove .mdx extensions in links (#10823) Some of them were added in #10800 some where already there --- command/hcl2_upgrade.go | 4 ++-- .../hcl2_upgrade/complete/expected.pkr.hcl | 4 ++-- .../docs/plugins/creation/custom-datasources.mdx | 2 +- .../templates/hcl_templates/contextual-variables.mdx | 10 +++++----- .../templates/hcl_templates/functions/string/regex.mdx | 6 +++--- .../hcl_templates/functions/string/regexall.mdx | 4 ++-- .../docs/templates/legacy_json_templates/engine.mdx | 10 +++++----- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index f96a037e5..5c7ee1bcc 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -107,7 +107,7 @@ const ( # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon AMI Data Source here: -# https://www.packer.io/docs/datasources/amazon/ami.mdx` +# https://www.packer.io/docs/datasources/amazon/ami` amazonSecretsManagerDataHeader = ` # The amazon-secretsmanager data block is generated from your aws_secretsmanager template function; a data @@ -115,7 +115,7 @@ const ( # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon Secrets Manager Data Source here: -# https://www.packer.io/docs/datasources/amazon/secretsmanager.mdx` +# https://www.packer.io/docs/datasources/amazon/secretsmanager` ) var ( diff --git a/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl index cf9019a98..3f1a46150 100644 --- a/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl @@ -52,7 +52,7 @@ variable "secret_account" { # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon Secrets Manager Data Source here: -# https://www.packer.io/docs/datasources/amazon/secretsmanager.mdx +# https://www.packer.io/docs/datasources/amazon/secretsmanager data "amazon-secretsmanager" "autogenerated_1" { name = "sample/app/password" } @@ -76,7 +76,7 @@ data "amazon-secretsmanager" "autogenerated_4" { # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon AMI Data Source here: -# https://www.packer.io/docs/datasources/amazon/ami.mdx +# https://www.packer.io/docs/datasources/amazon/ami data "amazon-ami" "autogenerated_1" { access_key = "${var.aws_access_key}" filters = { diff --git a/website/content/docs/plugins/creation/custom-datasources.mdx b/website/content/docs/plugins/creation/custom-datasources.mdx index 238232b9f..b9f1055fd 100644 --- a/website/content/docs/plugins/creation/custom-datasources.mdx +++ b/website/content/docs/plugins/creation/custom-datasources.mdx @@ -10,7 +10,7 @@ sidebar_title: Custom Data Sources Packer Data Sources are the components of Packer that allow data to be fetched for use within the configuration. Use of data sources allows a build to use information defined outside of Packer. An example of -data source is the [amazon-ami data source](/docs/datasources/amazon/ami.mdx), which outputs the data of a fetched Amazon AMI. +data source is the [amazon-ami data source](/docs/datasources/amazon/ami), which outputs the data of a fetched Amazon AMI. Prior to reading this page, it is assumed you have read the page on [plugin development basics](/docs/plugins). diff --git a/website/content/docs/templates/hcl_templates/contextual-variables.mdx b/website/content/docs/templates/hcl_templates/contextual-variables.mdx index 7bbfbc015..1bc7152c9 100644 --- a/website/content/docs/templates/hcl_templates/contextual-variables.mdx +++ b/website/content/docs/templates/hcl_templates/contextual-variables.mdx @@ -78,11 +78,11 @@ Example of using [upper](/docs/templates/hcl_templates/functions/string/upper) t For builder-specific builder variables, please also refer to the builder docs: -- Amazon EC2: [chroot](/docs/builders/amazon/chroot.mdx#build-shared-information-variables), - [EBS Volume](/docs/builders/amazon/ebsvolume.mdx#build-shared-information-variables), - [EBS](/docs/builders/amazon/ebs.mdx#build-shared-information-variables), - [EBS Surrogate](/docs/builders/amazon/ebssurrogate.mdx#build-shared-information-variables), - [Instance](/docs/builders/amazon/instance.mdx#build-shared-information-variables). +- Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables), + [EBS Volume](/docs/builders/amazon/ebsvolume#build-shared-information-variables), + [EBS](/docs/builders/amazon/ebs#build-shared-information-variables), + [EBS Surrogate](/docs/builders/amazon/ebssurrogate#build-shared-information-variables), + [Instance](/docs/builders/amazon/instance#build-shared-information-variables). The HCL2 Special Build Variables is in beta; please report any issues or requests on the Packer issue tracker on GitHub. diff --git a/website/content/docs/templates/hcl_templates/functions/string/regex.mdx b/website/content/docs/templates/hcl_templates/functions/string/regex.mdx index 2361f83e3..4ec51133c 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regex.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regex.mdx @@ -31,7 +31,7 @@ It's not valid to mix both named and unnamed capture groups in the same pattern. If the given pattern does not match at all, the `regex` raises an error. To _test_ whether a given pattern matches a string, use -[`regexall`](./regexall.mdx) and test that the result has length greater than +[`regexall`](./regexall) and test that the result has length greater than zero. The pattern is a string containing a mixture of literal characters and special @@ -153,8 +153,8 @@ string. ## Related Functions -- [`regexall`](./regexall.mdx) searches for potentially multiple matches of a given pattern in a string. -- [`replace`](./replace.mdx) replaces a substring of a string with another string, optionally matching using the same regular expression syntax as `regex`. +- [`regexall`](./regexall) searches for potentially multiple matches of a given pattern in a string. +- [`replace`](./replace) replaces a substring of a string with another string, optionally matching using the same regular expression syntax as `regex`. If Packer already has a more specialized function to parse the syntax you are trying to match, prefer to use that function instead. Regular expressions diff --git a/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx b/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx index b93f0456b..3dac57bff 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx @@ -15,7 +15,7 @@ to a string and returns a list of all matches. regexall(pattern, string) ``` -`regexall` is a variant of [`regex`](./regex.mdx) and uses the same pattern +`regexall` is a variant of [`regex`](./regex) and uses the same pattern syntax. For any given input to `regex`, `regexall` returns a list of whatever type `regex` would've returned, with one element per match. That is: @@ -48,7 +48,7 @@ false ## Related Functions -- [`regex`](./regex.mdx) searches for a single match of a given pattern, and +- [`regex`](./regex) searches for a single match of a given pattern, and returns an error if no match is found. If Packer already has a more specialized function to parse the syntax you diff --git a/website/content/docs/templates/legacy_json_templates/engine.mdx b/website/content/docs/templates/legacy_json_templates/engine.mdx index 727ff2135..0868f84a6 100644 --- a/website/content/docs/templates/legacy_json_templates/engine.mdx +++ b/website/content/docs/templates/legacy_json_templates/engine.mdx @@ -110,11 +110,11 @@ Here is a full list of the available functions for reference. For builder-specific builder variables, please also refer to the builder docs: - - Amazon EC2: [chroot](/docs/builders/amazon/chroot.mdx#build-shared-information-variables), - [EBS Volume](/docs/builders/amazon/ebsvolume.mdx#build-shared-information-variables), - [EBS](/docs/builders/amazon/ebs.mdx#build-shared-information-variables), - [EBS Surrogate](/docs/builders/amazon/ebssurrogate.mdx#build-shared-information-variables), - [Instance](/docs/builders/amazon/instance.mdx#build-shared-information-variables). + - Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables), + [EBS Volume](/docs/builders/amazon/ebsvolume#build-shared-information-variables), + [EBS](/docs/builders/amazon/ebs#build-shared-information-variables), + [EBS Surrogate](/docs/builders/amazon/ebssurrogate#build-shared-information-variables), + [Instance](/docs/builders/amazon/instance#build-shared-information-variables). This engine is in beta; please report any issues or requests on the Packer issue tracker on GitHub.