Commit 0c9affe5 authored by Jeff Escalante's avatar Jeff Escalante Committed by Calvin Leung Huang
Browse files

New Website! (#8154)

* new documentation website

* ci job adjustment

* update to latest version on downloads page

* remove transition-period scripts

* add netlify toml file

* fix docs patch

* fix ci config?

* revert go.mod changes

* a couple last markdown formatting fixes
parent 50437ab8
Showing with 18013 additions and 385 deletions
+18013 -385
-
title: "Auth Methods"
docs:
- api/auth/index.html
- api/auth/approle/index.html
- api/auth/alicloud/index.html
- api/auth/aws/index.html
- api/auth/azure/index.html
- api/auth/github/index.html
- api/auth/gcp/index.html
- api/auth/jwt/index.html
- api/auth/kubernetes/index.html
- api/auth/ldap/index.html
- api/auth/okta/index.html
- api/auth/cf/index.html
- api/auth/oci/index.html
- api/auth/radius/index.html
- api/auth/cert/index.html
- api/auth/token/index.html
- api/auth/userpass/index.html
-
title: "Secret Engines"
docs:
- api/secret/index.html
- api/secret/ad/index.html
- api/secret/alicloud/index.html
- api/secret/aws/index.html
- api/secret/azure/index.html
- api/secret/consul/index.html
- api/secret/cubbyhole/index.html
- api/secret/databases/index.html
- api/secret/gcp/index.html
- api/secret/gcpkms/index.html
- api/secret/kmip/index.html
- api/secret/kv/index.html
- api/secret/identity/index.html
- api/secret/nomad/index.html
- api/secret/pki/index.html
- api/secret/rabbitmq/index.html
- api/secret/ssh/index.html
- api/secret/totp/index.html
- api/secret/transit/index.html
-
title: "System Backends"
docs:
- api/system/index.html
- api/system/audit.html
- api/system/audit-hash.html
- api/system/auth.html
- api/system/capabilities.html
- api/system/capabilities-accessor.html
- api/system/capabilities-self.html
- api/system/config-auditing.html
- api/system/config-control-group.html
- api/system/config-cors.html
- api/system/config-state.html
- api/system/config-ui.html
- api/system/control-group.html
- api/system/generate-recovery-token.html
- api/system/generate-root.html
- api/system/health.html
- api/system/host-info.html
- api/system/init.html
- api/system/internal-specs-openapi.html
- api/system/internal-ui-mounts.html
- api/system/key-status.html
- api/system/leader.html
- api/system/leases.html
- api/system/license.html
- api/system/namespaces.html
- api/system/mfa/index.html
- api/system/mounts.html
- api/system/plugins-reload-backend.html
- api/system/plugins-catalog.html
- api/system/policy.html
- api/system/policies.html
- api/system/pprof.html
- api/system/raw.html
- api/system/rekey.html
- api/system/rekey-recovery-key.html
- api/system/remount.html
- api/system/replication/index.html
- api/system/rotate.html
- api/system/seal.html
- api/system/seal-status.html
- api/system/step-down.html
- api/system/tools.html
- api/system/unseal.html
- api/system/wrapping-lookup.html
- api/system/wrapping-rewrap.html
- api/system/wrapping-unwrap.html
- api/system/wrapping-wrap.html
// The root folder for this documentation category is `pages/docs`
//
// - A string refers to the name of a file
// - A "category" value refers to the name of a directory
// - All directories must have an "index.mdx" file to serve as
// the landing page for the category
export default [
{
category: 'install'
},
{
category: 'internals',
content: [
'architecture',
'high-availability',
'security',
'telemetry',
'token',
'rotation',
'replication',
'plugins'
]
},
{
category: 'concepts',
content: [
'dev-server',
'seal',
'lease',
'auth',
'tokens',
'response-wrapping',
'policies',
'ha',
'pgp-gpg-keybase',
'recovery-mode'
]
},
{
category: 'configuration',
content: [
{
category: 'listener',
content: ['tcp']
},
{
category: 'seal',
content: [
'alicloudkms',
'awskms',
'azurekeyvault',
'gcpckms',
'ocikms',
'pkcs11',
'transit'
]
},
{
category: 'storage',
content: [
'azure',
'cassandra',
'cockroachdb',
'consul',
'couchdb',
'dynamodb',
'etcd',
'filesystem',
'foundationdb',
'google-cloud-spanner',
'google-cloud-storage',
'in-memory',
'manta',
'mssql',
'mysql',
'oci-object-storage',
'postgresql',
'raft',
's3',
'swift',
'zookeeper'
]
},
{
category: 'service-registration',
content: ['consul']
},
'telemetry',
{ category: 'ui' },
{ category: 'entropy-augmentation' }
]
},
{
category: 'commands',
content: [
'agent',
{
category: 'audit',
content: ['disable', 'enable', 'list']
},
{
category: 'auth',
content: ['disable', 'enable', 'help', 'list', 'tune']
},
'debug',
'delete',
{
category: 'kv',
content: [
'delete',
'destroy',
'enable-versioning',
'get',
'list',
'metadata',
'patch',
'put',
'rollback',
'undelete'
]
},
{
category: 'lease',
content: ['renew', 'revoke']
},
'list',
'login',
'namespace',
{
category: 'operator',
content: [
'generate-root',
'init',
'key-status',
'migrate',
'rekey',
'rotate',
'seal',
'step-down',
'unseal'
]
},
'path-help',
{
category: 'plugin',
content: ['deregister', 'info', 'list', 'register']
},
{
category: 'policy',
content: ['delete', 'fmt', 'list', 'read', 'write']
},
'read',
{
category: 'secrets',
content: ['disable', 'enable', 'list', 'move', 'tune']
},
'server',
'ssh',
'status',
{
category: 'token',
content: ['capabilities', 'create', 'lookup', 'renew', 'revoke']
},
'unwrap',
'version',
'write',
'token-helper'
]
},
{
category: 'agent',
content: [
{
category: 'autoauth',
content: [
{
category: 'methods',
content: [
'alicloud',
'approle',
'aws',
'azure',
'cert',
'cf',
'gcp',
'jwt',
'kubernetes'
]
},
{
category: 'sinks',
content: ['file']
}
]
},
{ category: 'caching' },
{ category: 'template' }
]
},
'----------------',
{
category: 'secrets',
content: [
{ category: 'ad' },
{ category: 'alicloud' },
{ category: 'aws' },
{ category: 'azure' },
{ category: 'consul' },
{ category: 'cubbyhole' },
{
category: 'databases',
content: [
'cassandra',
'elasticdb',
'influxdb',
'hanadb',
'mongodb',
'mssql',
'mysql-maria',
'postgresql',
'oracle',
'custom'
]
},
{ category: 'gcp' },
{ category: 'gcpkms' },
{ category: 'kmip' },
{
category: 'kv',
content: ['kv-v1', 'kv-v2']
},
{ category: 'identity' },
{ category: 'nomad' },
{ category: 'pki' },
{ category: 'rabbitmq' },
{
category: 'ssh',
content: [
'signed-ssh-certificates',
'one-time-ssh-passwords',
'dynamic-ssh-keys'
]
},
{ category: 'totp' },
{ category: 'transit' },
'------------------------',
{ category: 'cassandra' },
{ category: 'mongodb' },
{ category: 'mssql' },
{ category: 'mysql' },
{ category: 'postgresql' }
]
},
{
category: 'auth',
content: [
'approle',
'alicloud',
'aws',
'azure',
'cf',
'gcp',
'jwt',
'kerberos',
'kubernetes',
'github',
'ldap',
'oci',
'okta',
'radius',
'cert',
'token',
'userpass',
'---------',
'app-id',
'mfa'
]
},
{
category: 'audit',
content: ['file', 'syslog', 'socket']
},
{
category: 'plugin'
},
'----------------',
{
category: 'what-is-vault'
},
{
category: 'use-cases'
},
{
category: 'partnerships'
},
{
category: 'vs',
content: [
'chef-puppet-etc',
'hsm',
'dropbox',
'consul',
'kms',
'keywhiz',
'custom'
]
},
'----------------',
{
category: 'platform',
content: [
{
category: 'k8s',
content: [
{
category: 'helm',
content: ['run', 'configuration', 'examples']
},
{
category: 'injector',
content: ['installation', 'examples']
}
]
},
{
category: 'aws-mp',
content: ['run']
}
]
},
'----------------',
{
category: 'upgrading',
content: [
'plugins',
'upgrade-to-0.5.0',
'upgrade-to-0.5.1',
'upgrade-to-0.6.0',
'upgrade-to-0.6.1',
'upgrade-to-0.6.2',
'upgrade-to-0.6.3',
'upgrade-to-0.6.4',
'upgrade-to-0.7.0',
'upgrade-to-0.8.0',
'upgrade-to-0.9.0',
'upgrade-to-0.9.1',
'upgrade-to-0.9.2',
'upgrade-to-0.9.3',
'upgrade-to-0.9.6',
'upgrade-to-0.10.0',
'upgrade-to-0.10.2',
'upgrade-to-0.10.4',
'upgrade-to-0.11.0',
'upgrade-to-0.11.2',
'upgrade-to-0.11.6',
'upgrade-to-1.0.0',
'upgrade-to-1.1.0',
'upgrade-to-1.1.1',
'upgrade-to-1.1.2',
'upgrade-to-1.2.0',
'upgrade-to-1.2.1',
'upgrade-to-1.2.4',
'upgrade-to-1.3.0'
]
},
'----------------',
{
category: 'enterprise',
content: [
{ category: 'replication' },
{
category: 'hsm',
content: ['behavior', 'security']
},
{ category: 'entropy-augmentation' },
{ category: 'sealwrap' },
{ category: 'namespaces' },
{ category: 'performance-standby' },
{ category: 'control-groups' },
{
category: 'mfa',
content: ['mfa-duo', 'mfa-okta', 'mfa-pingid', 'mfa-totp']
},
{
category: 'sentinel',
content: ['examples', 'properties']
}
]
}
]
-
description: "Installing Vault and Vault Enterprise."
link: "/docs/install"
title: "Installing Vault"
-
description: "Technical details about Vault's architecture, cryptographic components, and security model."
link: "/docs/internals"
title: Internals
-
description: "Foundational concepts critical to understanding how Vault operates."
link: "/docs/concepts"
title: "Concepts"
-
description: "Managing Vault via its Command Line Interface (CLI)."
link: "/docs/commands"
title: "Commands (CLI)"
-
description: "Deploying Vault systems and configuring components such as storage and unseal interfaces."
link: "/docs/configuration"
title: Configuration
-
description: "Configuring the Vault binary as a client daemon for performing security operations."
link: "/docs/agent"
title: "Vault Agent"
-
description: "Engines for performing security operations using secrets stored within Vault."
link: "/docs/secrets"
title: "Secret Engines"
-
description: "Methods for configuring how users and applications authenticate into Vault."
link: "/docs/auth"
title: "Auth Methods"
-
description: "Devices for capturing audit logs monitoring activity within Vault."
link: "/docs/audit"
title: "Audit Devices"
-
description: "Configuring how Vault operates with external systems and applications via plugins."
link: "/docs/plugin"
title: "Plugin Backends"
-
description: "Topics related to running Vault on specific platforms (such as Kubernetes)."
link: "/docs/platform"
title: "Platforms"
-
description: "Topics related to Vault Enterprise, Vault's premium varient for professional teams and organizations."
link: "/docs/enterprise"
title: "Vault Enterprise"
-
title: "Installing Vault"
docs:
- docs/install/index.html
-
title: Internals
docs:
- docs/internals/index.html
- docs/internals/architecture.html
- docs/internals/high-availability.html
- docs/internals/security.html
- docs/internals/telemetry.html
- docs/internals/token.html
- docs/internals/rotation.html
- docs/internals/replication.html
- docs/internals/plugins.html
-
title: "Concepts"
docs:
- docs/concepts/index.html
- docs/concepts/dev-server.html
- docs/concepts/seal.html
- docs/concepts/lease.html
- docs/concepts/auth.html
- docs/concepts/tokens.html
- docs/concepts/response-wrapping.html
- docs/concepts/policies.html
- docs/concepts/ha.html
- docs/concepts/pgp-gpg-keybase.html
- docs/concepts/recovery-mode.html
-
title: Configuration
docs:
- docs/configuration/index.html
- docs/configuration/telemetry.html
- docs/configuration/seal/index.html
- docs/configuration/listener/index.html
- docs/configuration/ui/index.html
-
title: "CLI Commands"
docs:
- docs/commands/index.html
- docs/commands/agent.html
- docs/commands/audit/index.html
- docs/commands/auth/index.html
- docs/commands/debug.html
- docs/commands/delete.html
- docs/commands/lease/index.html
- docs/commands/list.html
- docs/commands/login.html
- docs/commands/namespace.html
- docs/commands/operator/index.html
- docs/commands/path-help.html
- docs/commands/plugin/index.html
- docs/commands/policy/index.html
- docs/commands/read.html
- docs/commands/secrets/index.html
- docs/commands/server.html
- docs/commands/ssh.html
- docs/commands/status.html
- docs/commands/token/index.html
- docs/commands/unwrap.html
- docs/commands/write.html
- docs/commands/token-helper.html
-
title: "Vault Agent"
docs:
- docs/agent/index.html
- docs/agent/autoauth/index.html
- docs/agent/caching/index.html
-
title: "Secret Engines"
docs:
- docs/secrets/index.html
- docs/secrets/ad/index.html
- docs/secrets/alicloud/index.html
- docs/secrets/aws/index.html
- docs/secrets/azure/index.html
- docs/secrets/consul/index.html
- docs/secrets/cubbyhole/index.html
- docs/secrets/databases/index.html
- docs/secrets/gcp/index.html
- docs/secrets/gcpkms/index.html
- docs/secrets/kmip/index.html
- docs/secrets/kv/index.html
- docs/secrets/identity/index.html
- docs/secrets/nomad/index.html
- docs/secrets/pki/index.html
- docs/secrets/rabbitmq/index.html
- docs/secrets/ssh/index.html
- docs/secrets/totp/index.html
- docs/secrets/transit/index.html
- docs/secrets/cassandra/index.html
- docs/secrets/mongodb/index.html
- docs/secrets/mssql/index.html
- docs/secrets/mysql/index.html
- docs/secrets/postgresql/index.html
-
title: "Auth Methods"
docs:
- docs/auth/index.html
- docs/auth/approle.html
- docs/auth/alicloud.html
- docs/auth/aws.html
- docs/auth/azure.html
- docs/auth/gcp.html
- docs/auth/jwt.html
- docs/auth/kubernetes.html
- docs/auth/github.html
- docs/auth/ldap.html
- docs/auth/oci.html
- docs/auth/okta.html
- docs/auth/cf.html
- docs/auth/radius.html
- docs/auth/cert.html
- docs/auth/token.html
- docs/auth/userpass.html
- docs/auth/app-id.html
- docs/auth/mfa.html
-
title: "Audit Devices"
docs:
- docs/audit/index.html
- docs/audit/file.html
- docs/audit/syslog.html
- docs/audit/socket.html
-
title: "Plugin Backends"
docs:
- docs/plugin/index.html
-
title: "Platforms"
docs:
- docs/platform/k8s/index.html
- docs/platform/aws-mp/index.html
-
title: "Vault Enterprise"
docs:
- docs/enterprise/replication/index.html
- docs/enterprise/hsm/index.html
- docs/enterprise/sealwrap/index.html
- docs/enterprise/namespaces/index.html
- docs/enterprise/performance-standby/index.html
- docs/enterprise/control-groups/index.html
- docs/enterprise/mfa/index.html
- docs/enterprise/sentinel/index.html
export default [
{
category: 'getting-started'
},
{
category: 'operations',
content: [
'reference-architecture',
'vault-ha-consul',
'production',
'generate-root',
'rekeying-and-rotating',
'plugin-backends',
'--------------',
'replication',
'disaster-recovery',
'mount-filter',
'multi-tenant',
'autounseal-aws-kms',
'seal-wrap',
'monitoring'
]
},
{
category: 'identity',
content: [
'secure-intro',
'policies',
'authentication',
'approle-trusted-entities',
'lease',
'identity',
'--------------',
'sentinel',
'control-groups'
]
},
{
category: 'secret-mgmt',
content: [
'static-secrets',
'versioned-kv',
'dynamic-secrets',
'db-root-rotation',
'cubbyhole',
'ssh-otp',
'pki-engine',
'app-integration'
]
},
{
category: 'encryption',
content: ['transit', 'spring-demo', 'transit-rewrap']
}
]
// The root folder for this documentation category is `pages/intro`
//
// - A string refers to the name of a file
// - A "category" value refers to the name of a directory
// - All directories must have an "index.mdx" file to serve as
// the landing page for the category
export default [
{
category: 'getting-started',
content: [
'dev-server',
'first-secret',
'secrets-engines',
'dynamic-secrets',
'help',
'authentication',
'policies',
'deploy',
'apis',
'next-steps'
]
}
]
export default [
{ title: 'Overview', url: '/intro/getting-started' },
{
title: 'Use Cases',
links: [
{ title: 'Secrets Management', url: '/use-cases/secrets-management' },
{ title: 'Data Encryption', url: '/use-cases/data-encryption' },
{
title: 'Identity-based Access',
url: '/use-cases/identity-based-access'
}
]
},
{
title: 'Enterprise',
url: 'https://www.hashicorp.com/products/vault/enterprise'
},
{
title: 'Whitepaper',
url:
'https://www.hashicorp.com/resources/unlocking-the-cloud-operating-model-security?utm_source=vaultsubnav'
},
{ title: '|' },
{ title: 'Learn', url: 'https://learn.hashicorp.com/vault' },
{ title: 'Docs', url: '/docs' },
{ title: 'API', url: '/api-docs' },
{ title: 'Community', url: '/community' }
]
export const VERSION = '1.3.1'
locals {
github_parts = ["${split("/", var.github_repo)}"]
github_full = "${var.github_repo}"
github_org = "${local.github_parts[0]}"
github_repo = "${local.github_parts[1]}"
}
/*
-------------------------------------------------------------------
GitHub Resources
-------------------------------------------------------------------
*/
provider "github" {
organization = "${local.github_org}"
version = "~>2.0.0"
}
// Configure the repository with the dynamically created Netlify key.
resource "github_repository_deploy_key" "key" {
title = "Netlify"
repository = "${local.github_repo}"
key = "${netlify_deploy_key.key.public_key}"
read_only = false
}
// Create a webhook that triggers Netlify builds on push.
resource "github_repository_webhook" "main" {
repository = "${local.github_repo}"
events = ["delete", "push", "pull_request"]
configuration {
content_type = "json"
url = "https://api.netlify.com/hooks/github"
insecure_ssl = false
}
depends_on = ["netlify_site.main"]
}
/*
-------------------------------------------------------------------
Netlify Resources
-------------------------------------------------------------------
*/
provider "netlify" {
version = "~> 0.1.0"
}
// A new, unique deploy key for this specific website
resource "netlify_deploy_key" "key" {}
resource "netlify_site" "main" {
name = "${var.name}"
custom_domain = "${var.custom_site_domain}"
repo {
repo_branch = "${var.github_branch}"
command = "cd website && bundle && cd assets && npm i && cd .. && middleman build --verbose"
deploy_key_id = "${netlify_deploy_key.key.id}"
dir = "website/build"
provider = "github"
repo_path = "${local.github_full}"
}
}
variable "name" {
default = "vault-www"
description = "Name of the website in slug format."
}
variable "github_repo" {
default = "hashicorp/vault"
description = "GitHub repository of the provider in 'org/name' format."
}
variable "github_branch" {
default = "stable-website"
description = "GitHub branch which netlify will continuously deploy."
}
variable "custom_site_domain" {
default = "www.vaultproject.io"
description = "The custom domain to use for the Netlify site."
}
import DocsPage, { getInitialProps } from '../components/docs-page'
import orderData from '../data/api-navigation.js'
import { frontMatter } from '../pages/api-docs/**/*.mdx'
function ApiLayoutWrapper(pageMeta) {
function ApiLayout(props) {
return (
<DocsPage
{...props}
orderData={orderData}
frontMatter={frontMatter}
category="api-docs"
pageMeta={pageMeta}
/>
)
}
ApiLayout.getInitialProps = getInitialProps
return ApiLayout
}
export default ApiLayoutWrapper
import DocsPage, { getInitialProps } from '../components/docs-page'
import orderData from '../data/docs-navigation.js'
import { frontMatter } from '../pages/docs/**/*.mdx'
function DocsLayoutWrapper(pageMeta) {
function DocsLayout(props) {
return (
<DocsPage
{...props}
orderData={orderData}
frontMatter={frontMatter}
category="docs"
pageMeta={pageMeta}
/>
)
}
DocsLayout.getInitialProps = getInitialProps
return DocsLayout
}
export default DocsLayoutWrapper
import DocsPage, { getInitialProps } from '../components/docs-page'
import orderData from '../data/guides-navigation.js'
import { frontMatter } from '../pages/guides/**/*.mdx'
function GuidesLayoutWrapper(pageMeta) {
function GuidesLayout(props) {
return (
<DocsPage
{...props}
orderData={orderData}
frontMatter={frontMatter}
category="guides"
pageMeta={pageMeta}
/>
)
}
GuidesLayout.getInitialProps = getInitialProps
return GuidesLayout
}
export default GuidesLayoutWrapper
import DocsPage, { getInitialProps } from '../components/docs-page'
import orderData from '../data/intro-navigation.js'
import { frontMatter } from '../pages/intro/**/*.mdx'
function IntroLayoutWrapper(pageMeta) {
function IntroLayout(props) {
return (
<DocsPage
{...props}
orderData={orderData}
frontMatter={frontMatter}
category="intro"
pageMeta={pageMeta}
/>
)
}
IntroLayout.getInitialProps = getInitialProps
return IntroLayout
}
export default IntroLayoutWrapper
import React from 'react'
import bugsnag from '@bugsnag/js'
import bugsnagReact from '@bugsnag/plugin-react'
const apiKey =
typeof window === 'undefined'
? 'fb2dc40bb48b17140628754eac6c1b11'
: '07ff2d76ce27aded8833bf4804b73350'
const bugsnagClient = bugsnag({
apiKey,
releaseStage: process.env.NODE_ENV || 'development'
})
bugsnagClient.use(bugsnagReact, React)
export default bugsnagClient
import { open, init } from '@hashicorp/hashi-consent-manager'
const isProd = process.env.NODE_ENV === 'production'
window.openConsentManager = () => open()
const segmentWriteKey = isProd
? 'OdSFDq9PfujQpmkZf03dFpcUlywme4sC'
: '0EXTgkNx0Ydje2PGXVbRhpKKoe5wtzcE'
init({
version: 1,
// TODO: refactor into web components
let utilityServerRoot = isProd
? 'https://util.hashicorp.com'
: 'https://hashicorp-web-util-staging.herokuapp.com'
if (process.env.UTIL_SERVER) {
utilityServerRoot = process.env.UTIL_SERVER.replace(/\/$/, '')
}
// Consent manager configuration
export default {
version: 3,
container: '#consent-manager',
companyName: 'HashiCorp',
privacyPolicyLink: '/privacy',
......@@ -18,22 +30,21 @@ init({
category: 'Analytics'
},
{
name: 'Marketo V2',
name: 'Hotjar',
description:
'Marketo is a marketing automation tool that allows us to segment users into different categories based off of their behaviors. We use this information to provide tailored information to users in our email campaigns.',
category: 'Email Marketing'
'Hotjar is a service that generates heatmaps of where users click on our sites. We use this information to ensure that our site is not confusing, and simple to use and navigate.',
category: 'Analytics'
},
{
name: 'Hull',
name: 'LinkedIn Insight Tag',
description:
'Hull is a tool that we use to clean up analytics data and send it between different services. It does not add any javascript tracking code to this site.',
'This small script allows us to see how effective our linkedin campaigns are by showing which users have clicked through to our site.',
category: 'Analytics'
},
{
name: 'Hotjar',
name: 'Marketo V2',
description:
'Hotjar is a service that generates heatmaps of where users click on our sites. We use this information to ensure that our site is not confusing, and simple to use and navigate.',
category: 'Analytics'
'Marketo is a marketing automation tool that allows us to segment users into different categories based off of their behaviors. We use this information to provide tailored information to users in our email campaigns.'
}
],
categories: [
......@@ -59,7 +70,7 @@ init({
description:
"OptinMonster is a service that we use to show a prompt to sign up for our newsletter if it's perceived that you are interested in our content.",
category: 'Functional',
body: `var om597a24292a958,om597a24292a958_poll=function(){var e=0;return function(t,a){clearInterval(e),e=setInterval(t,a)}}();!function(e,t,a){if(e.getElementById(a))om597a24292a958_poll(function(){if(window.om_loaded&&!om597a24292a958)return(om597a24292a958=new OptinMonsterApp).init({s:"35109.597a24292a958",staging:0,dev:0,beta:0})},25);else{var n=!1,o=e.createElement("script");o.id=a,o.src="//a.optnmstr.com/app/js/api.min.js",o.async=!0,o.onload=o.onreadystatechange=function(){if(!(n||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState))try{n=om_loaded=!0,(om597a24292a958=new OptinMonsterApp).init({s:"35109.597a24292a958",staging:0,dev:0,beta:0}),o.onload=o.onreadystatechange=null}catch(e){}},(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(o)}}(document,0,"omapi-script");`
body: `var om598c8e3a6e43d,om598c8e3a6e43d_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){om598c8e3a6e43d_poll(function(){if(window['om_loaded']){if(!om598c8e3a6e43d){om598c8e3a6e43d=new OptinMonsterApp();return om598c8e3a6e43d.init({"s":"35109.598c8e3a6e43d","staging":0,"dev":0,"beta":0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src="https://a.optnmstr.com/app/js/api.min.js",o.async=true,o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){try{d=om_loaded=true;om598c8e3a6e43d=new OptinMonsterApp();om598c8e3a6e43d.init({"s":"35109.598c8e3a6e43d","staging":0,"dev":0,"beta":0});o.onload=o.onreadystatechange=null;}catch(t){}}}};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(o)}(document,"script","omapi-script");`
}
]
})
}
// If you run into issues with features missing in IE11, you likely need to
// make additions to this file for those features.
// See https://github.com/zloirock/core-js
import 'core-js/fn/array'
import 'core-js/fn/object/assign'
import 'core-js/fn/string/ends-with'
import 'core-js/fn/string/includes'
import 'core-js/fn/string/repeat'
import 'core-js/fn/string/starts-with'
import 'core-js/fn/symbol'
# This file sets configuration for Netlify
# ref: https://www.netlify.com/docs/netlify-toml-reference/
[build]
publish = "out"
command = "npm run static"
[context.production]
environment = { HASHI_ENV = "production", NODE_ENV = "production"}
[context.deploy-preview]
environment = { HASHI_ENV = "staging" }
const withHashicorp = require('@hashicorp/nextjs-scripts')
const path = require('path')
module.exports = withHashicorp({
defaultLayout: true,
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
mdx: { resolveIncludes: path.join(__dirname, 'pages') }
})({
experimental: {
css: true,
granularChunks: true,
rewrites: () => [
{
source: '/api/:path*',
destination: '/api-docs/:path*'
}
],
redirects: () => [
{ source: '/intro', destination: '/intro/getting-started' }
]
},
exportTrailingSlash: true,
webpack(config) {
// Add polyfills
const originalEntry = config.entry
config.entry = async () => {
const entries = await originalEntry()
let polyEntry = entries['static/runtime/polyfills.js']
if (polyEntry && !polyEntry.includes('./lib/polyfills.js')) {
if (!Array.isArray(polyEntry)) {
entries['static/runtime/polyfills.js'] = [polyEntry]
}
entries['static/runtime/polyfills.js'].unshift('./lib/polyfills.js')
}
return entries
}
return config
},
env: {
HASHI_ENV: process.env.HASHI_ENV
}
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment