|
1 | 1 | // @ts-check
|
2 |
| -import { defineConfig } from 'astro/config'; |
3 |
| -import starlight from '@astrojs/starlight'; |
4 |
| -import starlightLinksValidator from 'starlight-links-validator'; |
5 |
| -import vercel from '@astrojs/vercel'; |
| 2 | +import { defineConfig } from "astro/config"; |
| 3 | +import starlight from "@astrojs/starlight"; |
| 4 | +import starlightLinksValidator from "starlight-links-validator"; |
| 5 | +import vercel from "@astrojs/vercel"; |
| 6 | + |
| 7 | +import tailwindcss from "@tailwindcss/vite"; |
6 | 8 |
|
7 | 9 | export const sidebar = [
|
8 |
| - { |
9 |
| - label: 'Getting Started', |
10 |
| - autogenerate: { directory: '01-getting-started' }, |
11 |
| - }, |
12 |
| - { |
13 |
| - label: 'Features', |
14 |
| - autogenerate: { directory: '02-features', collapsed: true }, |
15 |
| - }, |
16 |
| - { |
17 |
| - label: 'Community', |
18 |
| - autogenerate: { directory: '03-community', collapsed: true }, |
19 |
| - }, |
20 |
| - { |
21 |
| - label: 'Reference', |
22 |
| - items: [ |
23 |
| - { label: 'HCL', autogenerate: { directory: '04-reference/01-hcl', collapsed: true } }, |
24 |
| - { |
25 |
| - label: 'CLI', collapsed: true, items: [ |
26 |
| - { label: 'Overview', slug: 'docs/reference/cli' }, |
27 |
| - { label: 'Commands', autogenerate: { directory: '04-reference/02-cli/02-commands', collapsed: true } }, |
28 |
| - { label: 'Global Flags', slug: 'docs/reference/cli/global-flags' }, |
29 |
| - { label: 'Rules', slug: 'docs/reference/cli/rules' }, |
30 |
| - ], |
31 |
| - }, |
32 |
| - { label: 'Strict Controls', slug: 'docs/reference/strict-controls' }, |
33 |
| - { label: 'Experiments', slug: 'docs/reference/experiments' }, |
34 |
| - { label: 'Supported Versions', slug: 'docs/reference/supported-versions' }, |
35 |
| - { label: 'Lock Files', slug: 'docs/reference/lock-files' }, |
36 |
| - { label: 'Logging', autogenerate: { directory: '04-reference/07-logging', collapsed: true } }, |
37 |
| - { label: 'Terragrunt Cache', slug: 'docs/reference/terragrunt-cache' }, |
38 |
| - ], |
39 |
| - }, |
40 |
| - { |
41 |
| - label: 'Troubleshooting', |
42 |
| - autogenerate: { directory: '05-troubleshooting', collapsed: true }, |
43 |
| - }, |
44 |
| - { |
45 |
| - label: 'Migrate', |
46 |
| - autogenerate: { directory: '06-migrate', collapsed: true }, |
47 |
| - }, |
| 10 | + { |
| 11 | + label: "Getting Started", |
| 12 | + autogenerate: { directory: "01-getting-started" }, |
| 13 | + }, |
| 14 | + { |
| 15 | + label: "Features", |
| 16 | + autogenerate: { directory: "02-features", collapsed: true }, |
| 17 | + }, |
| 18 | + { |
| 19 | + label: "Community", |
| 20 | + autogenerate: { directory: "03-community", collapsed: true }, |
| 21 | + }, |
| 22 | + { |
| 23 | + label: "Reference", |
| 24 | + items: [ |
| 25 | + { |
| 26 | + label: "HCL", |
| 27 | + autogenerate: { directory: "04-reference/01-hcl", collapsed: true }, |
| 28 | + }, |
| 29 | + { |
| 30 | + label: "CLI", |
| 31 | + collapsed: true, |
| 32 | + items: [ |
| 33 | + { label: "Overview", slug: "docs/reference/cli" }, |
| 34 | + { |
| 35 | + label: "Commands", |
| 36 | + autogenerate: { |
| 37 | + directory: "04-reference/02-cli/02-commands", |
| 38 | + collapsed: true, |
| 39 | + }, |
| 40 | + }, |
| 41 | + { label: "Global Flags", slug: "docs/reference/cli/global-flags" }, |
| 42 | + { label: "Rules", slug: "docs/reference/cli/rules" }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + { label: "Strict Controls", slug: "docs/reference/strict-controls" }, |
| 46 | + { label: "Experiments", slug: "docs/reference/experiments" }, |
| 47 | + { |
| 48 | + label: "Supported Versions", |
| 49 | + slug: "docs/reference/supported-versions", |
| 50 | + }, |
| 51 | + { label: "Lock Files", slug: "docs/reference/lock-files" }, |
| 52 | + { |
| 53 | + label: "Logging", |
| 54 | + autogenerate: { directory: "04-reference/07-logging", collapsed: true }, |
| 55 | + }, |
| 56 | + { label: "Terragrunt Cache", slug: "docs/reference/terragrunt-cache" }, |
| 57 | + ], |
| 58 | + }, |
| 59 | + { |
| 60 | + label: "Troubleshooting", |
| 61 | + autogenerate: { directory: "05-troubleshooting", collapsed: true }, |
| 62 | + }, |
| 63 | + { |
| 64 | + label: "Migrate", |
| 65 | + autogenerate: { directory: "06-migrate", collapsed: true }, |
| 66 | + }, |
48 | 67 | ];
|
49 | 68 |
|
50 | 69 | // https://astro.build/config
|
51 | 70 | export default defineConfig({
|
52 |
| - site: 'https://terragrunt-v1.gruntwork.io', |
53 |
| - output: 'server', |
54 |
| - adapter: vercel({ |
55 |
| - isr: { |
56 |
| - expiration: 60 * 60 * 24, // 24 hours |
57 |
| - }, |
58 |
| - }), |
59 |
| - integrations: [ |
60 |
| - starlight({ |
61 |
| - title: 'Terragrunt', |
62 |
| - logo: { |
63 |
| - dark: '/src/assets/logo-light.svg', |
64 |
| - light: '/src/assets/logo-dark.svg', |
65 |
| - }, |
66 |
| - social: { |
67 |
| - github: 'https://github.com/gruntwork-io/terragrunt', |
68 |
| - discord: 'https://discord.gg/SPu4Degs5f', |
69 |
| - }, |
70 |
| - sidebar: sidebar, |
71 |
| - // NOTE: We don't currently check links by default because the CLI |
72 |
| - // Redesign isn't done yet. Once those pages are built out, we'll require |
73 |
| - // links to be checked for all builds. |
74 |
| - plugins: [starlightLinksValidator({ |
75 |
| - exclude: [ |
76 |
| - // Used in the docs for OpenTelemetry |
77 |
| - 'http://localhost:16686/', |
78 |
| - 'http://localhost:9090/', |
| 71 | + site: "https://terragrunt-v1.gruntwork.io", |
| 72 | + output: "server", |
| 73 | + |
| 74 | + adapter: vercel({ |
| 75 | + isr: { |
| 76 | + expiration: 60 * 60 * 24, // 24 hours |
| 77 | + }, |
| 78 | + }), |
| 79 | + |
| 80 | + integrations: [ |
| 81 | + starlight({ |
| 82 | + title: "Terragrunt", |
| 83 | + customCss: ["./src/styles/global.css"], |
| 84 | + logo: { |
| 85 | + dark: "/src/assets/logo-light.svg", |
| 86 | + light: "/src/assets/logo-dark.svg", |
| 87 | + }, |
| 88 | + social: { |
| 89 | + github: "https://github.com/gruntwork-io/terragrunt", |
| 90 | + discord: "https://discord.gg/SPu4Degs5f", |
| 91 | + }, |
| 92 | + sidebar: sidebar, |
| 93 | + // NOTE: We don't currently check links by default because the CLI |
| 94 | + // Redesign isn't done yet. Once those pages are built out, we'll require |
| 95 | + // links to be checked for all builds. |
| 96 | + plugins: [ |
| 97 | + starlightLinksValidator({ |
| 98 | + exclude: [ |
| 99 | + // Used in the docs for OpenTelemetry |
| 100 | + "http://localhost:16686/", |
| 101 | + "http://localhost:9090/", |
| 102 | + |
| 103 | + // Unfortunately, these have to be ignored, as they're |
| 104 | + // referencing content that is generated outside the contents of the markdown file. |
| 105 | + "/docs/reference/cli/commands/run#*", |
| 106 | + "/docs/reference/cli/commands/run/#*", |
| 107 | + ], |
| 108 | + }), |
| 109 | + ], |
| 110 | + }), |
| 111 | + ], |
| 112 | + |
| 113 | + redirects: { |
| 114 | + // Pages that have been rehomed. |
| 115 | + "/docs/features/debugging/": "/docs/troubleshooting/debugging/", |
| 116 | + "/docs/upgrade/upgrading_to_terragrunt_0.19.x/": |
| 117 | + "/docs/migrate/upgrading_to_terragrunt_0.19.x/", |
79 | 118 |
|
80 |
| - // Unfortunately, these have to be ignored, as they're |
81 |
| - // referencing content that is generated outside the contents of the markdown file. |
82 |
| - '/docs/reference/cli/commands/run#*', |
83 |
| - '/docs/reference/cli/commands/run/#*', |
84 |
| - ], |
85 |
| - })], |
86 |
| - }), |
87 |
| - ], |
88 |
| - redirects: { |
89 |
| - // Pages that have been rehomed. |
90 |
| - "/docs/features/debugging/": "/docs/troubleshooting/debugging/", |
91 |
| - "/docs/upgrade/upgrading_to_terragrunt_0.19.x/": "/docs/migrate/upgrading_to_terragrunt_0.19.x/", |
| 119 | + // Redirects to external sites. |
| 120 | + "/contact/": "https://gruntwork.io/contact", |
| 121 | + "/commercial-support/": "https://gruntwork.io/support", |
| 122 | + "/cookie-policy/": "https://gruntwork.io/legal/cookie-policy/", |
92 | 123 |
|
93 |
| - // Redirects to external sites. |
94 |
| - "/contact/": "https://gruntwork.io/contact", |
95 |
| - "/commercial-support/": "https://gruntwork.io/support", |
96 |
| - "/cookie-policy/": "https://gruntwork.io/legal/cookie-policy/", |
| 124 | + // Restructured docs |
| 125 | + "/docs/reference/configuration/": "/docs/reference/hcl/", |
| 126 | + "/docs/reference/cli-options/": "/docs/reference/cli/", |
| 127 | + "/docs/reference/built-in-functions/": "/docs/reference/hcl/functions/", |
| 128 | + "/docs/reference/config-blocks-and-attributes/": |
| 129 | + "/docs/reference/hcl/blocks/", |
| 130 | + "/docs/reference/strict-mode/": "/docs/reference/strict-controls/", |
| 131 | + "/docs/reference/log-formatting/": "/docs/reference/logging/formatting/", |
| 132 | + "/docs/features/aws-authentication/": "/docs/features/authentication/", |
| 133 | + "/docs/reference/experiment-mode/": "/docs/reference/experiments/", |
97 | 134 |
|
98 |
| - // Restructured docs |
99 |
| - "/docs/reference/configuration/": "/docs/reference/hcl/", |
100 |
| - "/docs/reference/cli-options/": "/docs/reference/cli/", |
101 |
| - "/docs/reference/built-in-functions/": "/docs/reference/hcl/functions/", |
102 |
| - "/docs/reference/config-blocks-and-attributes/": "/docs/reference/hcl/blocks/", |
103 |
| - "/docs/reference/strict-mode/": "/docs/reference/strict-controls/", |
104 |
| - "/docs/reference/log-formatting/": "/docs/reference/logging/formatting/", |
105 |
| - "/docs/features/aws-authentication/": "/docs/features/authentication/", |
106 |
| - "/docs/reference/experiment-mode/": "/docs/reference/experiments/", |
| 135 | + // Support old doc structure paths |
| 136 | + "/docs/": "/docs/getting-started/quick-start/", |
| 137 | + "/docs/getting-started/": "/docs/getting-started/quick-start/", |
| 138 | + "/docs/features/": "/docs/features/units/", |
| 139 | + "/docs/reference/": "/docs/reference/hcl/", |
| 140 | + "/docs/troubleshooting/": "/docs/troubleshooting/debugging/", |
| 141 | + "/docs/migrate/": "/docs/migrate/migrating-from-root-terragrunt-hcl/", |
107 | 142 |
|
108 |
| - // Support old doc structure paths |
109 |
| - "/docs/": "/docs/getting-started/quick-start/", |
110 |
| - "/docs/getting-started/": "/docs/getting-started/quick-start/", |
111 |
| - "/docs/features/": "/docs/features/units/", |
112 |
| - "/docs/reference/": "/docs/reference/hcl/", |
113 |
| - "/docs/troubleshooting/": "/docs/troubleshooting/debugging/", |
114 |
| - "/docs/migrate/": "/docs/migrate/migrating-from-root-terragrunt-hcl/", |
| 143 | + // Support old community paths |
| 144 | + "/docs/community/": "/docs/community/contributing/", |
| 145 | + "/support/": "/docs/community/support/", |
115 | 146 |
|
116 |
| - // Support old community paths |
117 |
| - "/docs/community/": "/docs/community/contributing/", |
118 |
| - "/support/": "/docs/community/support/", |
| 147 | + // Support old feature paths |
| 148 | + "/docs/features/inputs/": "/docs/features/units/", |
| 149 | + "/docs/features/locals/": "/docs/features/units/", |
| 150 | + "/docs/features/keep-your-terraform-code-dry/": "/docs/features/units/", |
| 151 | + "/docs/features/execute-terraform-commands-on-multiple-units-at-once/": |
| 152 | + "/docs/features/stacks/", |
| 153 | + "/docs/features/keep-your-terragrunt-architecture-dry/": |
| 154 | + "/docs/features/includes/", |
| 155 | + "/docs/features/keep-your-remote-state-configuration-dry/": |
| 156 | + "/docs/features/state-backend/", |
| 157 | + "/docs/features/keep-your-cli-flags-dry/": |
| 158 | + "/docs/features/extra-arguments/", |
| 159 | + "/docs/features/aws-auth/": "/docs/features/aws-authentication/", |
| 160 | + "/docs/features/work-with-multiple-aws-accounts/": |
| 161 | + "/docs/features/aws-authentication/", |
| 162 | + "/docs/features/auto-retry/": "/docs/features/runtime-control/", |
| 163 | + "/docs/features/provider-cache/": "/docs/features/provider-cache-server/", |
| 164 | + "/docs/features/provider-caching/": "/docs/features/provider-cache-server/", |
| 165 | + }, |
119 | 166 |
|
120 |
| - // Support old feature paths |
121 |
| - "/docs/features/inputs/": "/docs/features/units/", |
122 |
| - "/docs/features/locals/": "/docs/features/units/", |
123 |
| - "/docs/features/keep-your-terraform-code-dry/": "/docs/features/units/", |
124 |
| - "/docs/features/execute-terraform-commands-on-multiple-units-at-once/": "/docs/features/stacks/", |
125 |
| - "/docs/features/keep-your-terragrunt-architecture-dry/": "/docs/features/includes/", |
126 |
| - "/docs/features/keep-your-remote-state-configuration-dry/": "/docs/features/state-backend/", |
127 |
| - "/docs/features/keep-your-cli-flags-dry/": "/docs/features/extra-arguments/", |
128 |
| - "/docs/features/aws-auth/": "/docs/features/aws-authentication/", |
129 |
| - "/docs/features/work-with-multiple-aws-accounts/": "/docs/features/aws-authentication/", |
130 |
| - "/docs/features/auto-retry/": "/docs/features/runtime-control/", |
131 |
| - "/docs/features/provider-cache/": "/docs/features/provider-cache-server/", |
132 |
| - "/docs/features/provider-caching/": "/docs/features/provider-cache-server/", |
133 |
| - }, |
| 167 | + vite: { |
| 168 | + plugins: [tailwindcss()], |
| 169 | + }, |
134 | 170 | });
|
0 commit comments