2022-10-24 14:48:02 -04:00
|
|
|
/**
|
|
|
|
|
* Define your custom redirects within this file.
|
|
|
|
|
*
|
|
|
|
|
* Vercel's redirect documentation:
|
|
|
|
|
* https://nextjs.org/docs/api-reference/next.config.js/redirects
|
|
|
|
|
*
|
|
|
|
|
* Relative paths with fragments (#) are not supported.
|
|
|
|
|
* For destinations with fragments, use an absolute URL.
|
|
|
|
|
*
|
|
|
|
|
* Playground for testing url pattern matching: https://npm.runkit.com/path-to-regexp
|
|
|
|
|
*
|
|
|
|
|
* Note that redirects defined in a product's redirects file are applied to
|
|
|
|
|
* the developer.hashicorp.com domain, which is where the documentation content
|
|
|
|
|
* is rendered. Redirect sources should be prefixed with the product slug
|
|
|
|
|
* to ensure they are scoped to the product's section. Any redirects that are
|
|
|
|
|
* not prefixed with a product slug will be ignored.
|
|
|
|
|
*/
|
2021-01-11 14:10:47 -05:00
|
|
|
module.exports = [
|
2022-10-24 14:48:02 -04:00
|
|
|
/*
|
|
|
|
|
Example redirect:
|
2021-12-14 06:22:36 -05:00
|
|
|
{
|
2022-10-24 14:48:02 -04:00
|
|
|
source: '/packer/docs/internal-docs/my-page',
|
|
|
|
|
destination: '/packer/docs/internals/my-page',
|
2021-12-14 06:22:36 -05:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
2022-10-24 14:48:02 -04:00
|
|
|
*/
|
2022-11-01 12:59:49 -04:00
|
|
|
/**
|
|
|
|
|
* BEGIN EMPTY PAGE REDIRECTS
|
|
|
|
|
* These redirects ensure some empty placeholder pages, dating back to when
|
|
|
|
|
* "Overview" pages were a requirement, cannot be visited.
|
|
|
|
|
*
|
|
|
|
|
* These redirects can likely be removed once we have content API "pruning"
|
|
|
|
|
* in place. That is, assuming the page at https://developer.hashicorp.com/packer/docs/templates/hcl_templates/functions/conversion
|
|
|
|
|
* is still empty, the content API response from the content URL for that page
|
|
|
|
|
* (https://content.hashicorp.com/api/content/packer/doc/latest/docs/templates/hcl_templates/functions/conversion)
|
|
|
|
|
* should be a 404. Asana task for this "don't return content for empty" work:
|
|
|
|
|
* https://app.asana.com/0/1100423001970639/1202110665886351/f
|
|
|
|
|
*/
|
2022-11-01 13:36:10 -04:00
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/collection',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/contextual',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/conversion',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/crypto',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/encoding',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/file',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/ipnet',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/numeric',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/string',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/templates/hcl_templates/functions/uuid',
|
|
|
|
|
destination: '/packer/docs/templates/hcl_templates/functions',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-05-31 11:52:47 -07:00
|
|
|
{
|
|
|
|
|
source: '/packer/docs/plugins/install-plugins',
|
|
|
|
|
destination: '/packer/docs/plugins/install',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-01-23 19:41:57 -08:00
|
|
|
{
|
|
|
|
|
source: '/packer/docs/provisioners/custom',
|
|
|
|
|
destination: '/packer/docs/plugins/creation/custom-provisioners',
|
|
|
|
|
permanent: true,
|
2025-01-30 10:28:12 -08:00
|
|
|
},
|
2022-11-01 12:59:49 -04:00
|
|
|
/**
|
|
|
|
|
* END EMPTY PAGE REDIRECTS
|
|
|
|
|
*/
|
2025-01-23 16:02:43 -08:00
|
|
|
{
|
|
|
|
|
source: '/packer/docs/builders/custom',
|
|
|
|
|
destination: '/packer/docs/plugins/creation/custom-builders',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/packer/docs/install',
|
|
|
|
|
destination: '/packer/install',
|
|
|
|
|
permanent: true,
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-11 14:10:47 -05:00
|
|
|
]
|