Skip to content

Commit 05ac3d1

Browse files
author
Jacob Logan
committed
merge next-release/main
2 parents 7a3ff2c + f5e74fc commit 05ac3d1

File tree

169 files changed

+3639
-1281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+3639
-1281
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/src/**/cli/ @josefaidt @aws-amplify/documentation-team
77

88
#Studio
9-
/src/pages/console/ @wrpeck @aws-amplify/documentation-team
9+
/src/pages/console/ @dbanksdesign @aws-amplify/documentation-team
1010

1111
#Analytics
1212
/src/**/**/analytics @abdallahshaban557 @aws-amplify/documentation-team

Readme.md

+33-27
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@
1313

1414
1. [Fork this repo](/fork) and `git clone` it.
1515
2. In your terminal, navigate to the repo from where it was just cloned. This should be located at the `/docs` directory.
16-
2. From your command line, run `yarn && yarn dev`.
17-
3. <http://localhost:3000/> should open automatically.
16+
3. From your command line, run `yarn && yarn dev`.
17+
4. <http://localhost:3000/> should open automatically.
1818

1919
## How to contribute
2020

2121
We welcome contributions to the documentation site! Here's how to do it:
2222

2323
1. Follow our [styleguide](https://github.com/aws-amplify/docs/blob/main/STYLEGUIDE.md), especially if writing longer pieces.
24-
2. Verify your changes locally.
24+
2. Verify your changes locally.
2525
3. Make a PR to our `main` branch.
26-
1. Please include any [issues](https://github.com/aws-amplify/docs/issues) your PR addresses.
27-
2. If any files have been deleted with your PR, please indicate that `redirects are needed` in your PR description and/or add the `redirects-needed` label.
26+
1. Please include any [issues](https://github.com/aws-amplify/docs/issues) your PR addresses.
27+
2. If any files have been deleted with your PR, please add the redirects required to [`redirects.json`](https://github.com/aws-amplify/docs/blob/main/redirects.json) and ensure that the `redirects-needed` label has been added.
28+
- Please see the [Amplify Hosting user guide](https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html) for guidance on values and ordering.
29+
- Please note that there is a manual step for the Docs Engineering team to complete before the redirects are live.
2830

2931
**What's next?** After your PR is reviewed and all tests pass, it will be merged and the branch will be deleted.
3032

@@ -48,49 +50,50 @@ IMPORTANT: Every page has to have a `title` and `description` meta field.
4850
The markdown body is parsed as [MDX](https://mdxjs.com/) and can include any valid HTML or JSX.
4951

5052
### Fragments
53+
5154
To incorporate new platform-specific content within a page, please use [Inline Filters](https://github.com/aws-amplify/docs/blob/main/Readme.md#inline-filters).
5255

5356
When editing content that hasn't been migrated, you may see the following pattern:
5457

5558
```jsx
56-
import js from "/src/fragments/lib/datastore/js/conflict.mdx";
59+
import js from '/src/fragments/lib/datastore/js/conflict.mdx';
5760

58-
<Fragments fragments={{js: js}} />;
61+
<Fragments fragments={{ js: js }} />;
5962
```
6063

6164
This pattern incorporates fragment files into a page and conditionally renders content based off selected platform added as a condition to the `Fragments` tag.
6265

6366
This fragment would exist in: `pages/src/fragments/lib/datastore/js/conflict.mdx`
6467

65-
### Inline Filters
68+
### Inline Filters
6669

6770
We are incorporating the use of `<InlineFilters>` to add platform-specific content within the context of one page rather than in fragments. These filters allow you to still specify content by platform and they reference platforms using the same naming convention as our fragments. You can enclose your platform-specific content by updating the opening tag:
6871

69-
````md
72+
```md
7073
<InlineFilter filters={["js", "react-native", "android", "ios", "flutter"]}>
7174

7275
</InlineFilter>
73-
````
74-
76+
```
77+
7578
If you are updating content on a page, please note any inline filter tags which may be indicating a specific platform as you make your edits.
7679

77-
### Accordion
80+
### Accordion
7881

7982
`Accordion` This single-use accordion hides peripheral content until the reader selects to expand the section. This helps you keep your pages focused on the need-to-know information upfront, while also providing readers an option to dive deeper when they choose. These accordions can provide peripheral content such as additional context for beginners, advanced deep dives for those who want to off-road, and troubleshooting guidance for errors users may encounter.
8083

8184
Here is an example of its usage:
8285

83-
````md
86+
```md
8487
<Accordion title='Review recommended accordion usage' headingLevel='4' eyebrow='Learn more'>
8588

8689
- Title – Make your title descriptive to help readers know what the accordion contains before they click.
8790
- Eyebrow – Update this text to reflect the purpose of the accordion. We recommend:
88-
- Learn more – used to add additional context that is not needed upfront but is useful for users to review when they choose.
89-
- Troubleshooting – used when adding details to troubleshoot specific errors within context.
90-
- Walkthrough – used when adding a step-by-step example for those who need more direct guidance.
91+
- Learn more – used to add additional context that is not needed upfront but is useful for users to review when they choose.
92+
- Troubleshooting – used when adding details to troubleshoot specific errors within context.
93+
- Walkthrough – used when adding a step-by-step example for those who need more direct guidance.
9194

9295
</Accordion>
93-
````
96+
```
9497

9598
### Tab-switchable Blocks
9699

@@ -102,15 +105,15 @@ Here is an example of its usage:
102105
<Block name="JavaScript">
103106

104107
```js
105-
const a = "a";
108+
const a = 'a';
106109
```
107110

108111
</Block>
109112

110113
<Block name="TypeScript">
111114

112115
```ts
113-
const a: "a" = "a";
116+
const a: 'a' = 'a';
114117
```
115118

116119
</Block>
@@ -129,23 +132,26 @@ let mut a = String::from("a");
129132
## Debug client-side code with browser developer tools
130133

131134
### Prerequisites
132-
- [React Dev Tools](https://reactjs.org/tutorial/tutorial.html#developer-tools)
133-
- [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
134-
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)
135+
136+
- [React Dev Tools](https://reactjs.org/tutorial/tutorial.html#developer-tools)
137+
- [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
138+
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)
135139

136140
### To debug
141+
137142
1. Set up the repo and run it with the `dev` script mentioned above in the "Getting Started" section.
138143
2. On your localhost page, go to the page with the React component you want to debug and open up the developer tools.
139144
3. To know which source file to breakpoint on, we need to find the name of the component first.
140-
- Open up the dev tools and use the react dev tools to find the component. Do this by using the "Select an element on the page to inspect it" tool under the "Components" tab.
141145

142-
- Search for the variable/component name inside the source code to find the file you want to debug.
146+
- Open up the dev tools and use the react dev tools to find the component. Do this by using the "Select an element on the page to inspect it" tool under the "Components" tab.
147+
148+
- Search for the variable/component name inside the source code to find the file you want to debug.
149+
150+
- Place the breakpoint inside the file under the "Sources" tab in the browser's dev tools.
151+
- Note that since the Amplify Docs site is built with nextjs, file paths will start with "`webpack://_N_E/./`"
143152

144-
- Place the breakpoint inside the file under the "Sources" tab in the browser's dev tools.
145-
- Note that since the Amplify Docs site is built with nextjs, file paths will start with "`webpack://_N_E/./`"
146153
4. Refresh your localhost site and the breakpoint should hit in the browser's dev tools. You should be able to debug the code.
147154

148155
Another way to find which file you want to debug is to search for strings/paragraphs seen in Amplify docs site. Search for the strings in your code editor and you'll find that they will be in a `.mdx` file. You should see the components that are being rendered and be able to find the file name you want to debug.
149156

150-
151157
More info on debugging can be found here: https://nextjs.org/docs/advanced-features/debugging

amplify.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ frontend:
77
build:
88
commands:
99
- echo "BUILD_ENV=$BUILD_ENV" >> .env.custom
10+
- node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
1011
- NODE_ENV=production yarn build:release
1112
artifacts:
1213
# IMPORTANT - Please verify your build output directory

next.config.mjs

+13-31
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import rehypeImgSize from 'rehype-img-size';
77
import remarkGfm from 'remark-gfm';
88
dotenv.config({ path: './.env.custom' });
99

10-
export default async () => {
10+
export default () => {
1111
const withMDX = createMDX({
1212
extension: /\.mdx$/,
1313
options: {
@@ -19,18 +19,26 @@ export default async () => {
1919
const shouldAnalyzeBundles = process.env.ANALYZE === 'true';
2020

2121
let nextConfig = withMDX({
22+
output: 'export',
23+
distDir: 'client/www/next-build',
2224
env: {
2325
BUILD_ENV: process.env.BUILD_ENV,
26+
// eslint-disable-next-line @typescript-eslint/camelcase
2427
nextImageExportOptimizer_imageFolderPath: 'public',
28+
// eslint-disable-next-line @typescript-eslint/camelcase
2529
nextImageExportOptimizer_exportFolderPath: 'out',
26-
nextImageExportOptimizer_quality: 75,
27-
nextImageExportOptimizer_storePicturesInWEBP: true,
30+
// eslint-disable-next-line @typescript-eslint/camelcase
31+
nextImageExportOptimizer_quality: '75',
32+
// eslint-disable-next-line @typescript-eslint/camelcase
33+
nextImageExportOptimizer_storePicturesInWEBP: 'true',
34+
// eslint-disable-next-line @typescript-eslint/camelcase
2835
nextImageExportOptimizer_exportFolderName: 'nextImageExportOptimizer',
2936

3037
// If you do not want to use blurry placeholder images, then you can set
3138
// nextImageExportOptimizer_generateAndUseBlurImages to false and pass
3239
// `placeholder="empty"` to all <ExportedImage> components.
33-
nextImageExportOptimizer_generateAndUseBlurImages: true
40+
// eslint-disable-next-line @typescript-eslint/camelcase
41+
nextImageExportOptimizer_generateAndUseBlurImages: 'true'
3442
},
3543
images: {
3644
loader: 'custom',
@@ -49,33 +57,7 @@ export default async () => {
4957
transpilePackages: [
5058
'@algolia/autocomplete-shared',
5159
'next-image-export-optimizer'
52-
],
53-
// eslint-disable-next-line @typescript-eslint/require-await
54-
async headers() {
55-
return [
56-
{
57-
// Apply these headers to all routes in your application.
58-
source: '/(.*)',
59-
headers: [
60-
// IMPORTANT:
61-
// These are ONLY used for the Dev server and MUST
62-
// be kept in sync with customHttp.yml
63-
{
64-
key: 'Strict-Transport-Security',
65-
value: 'max-age=63072000; includeSubDomains'
66-
},
67-
{
68-
key: 'X-Frame-Options',
69-
value: 'SAMEORIGIN'
70-
},
71-
{
72-
key: 'X-Content-Type-Options',
73-
value: 'nosniff'
74-
}
75-
]
76-
}
77-
];
78-
}
60+
]
7961
});
8062

8163
if (shouldAnalyzeBundles) {

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"html-entities": "^1.2.1",
3232
"instantsearch.js": "^4.39.1",
3333
"mdx-prism": "^0.3.4",
34-
"next": "^13.2.4",
34+
"next": "^13.5.6",
3535
"next-image-export-optimizer": "^1.8.3",
3636
"next-transpile-modules": "^9.0.0",
3737
"parse-imports": "^1.1.0",
@@ -142,7 +142,7 @@
142142
"dev": "yarn prebuild && next dev",
143143
"spellcheck": "cspell \"src/**/*.mdx\" --no-progress",
144144
"spellcheck-diff": "git diff --name-only --cached | awk \"/src.*\\.mdx/{print}\" | npx cspell --no-must-find-files --file-list stdin",
145-
"build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build",
145+
"build": "node tasks/generate-sitemap.mjs && next build",
146146
"build:release": "yarn build && next-image-export-optimizer --exportFolderPath client/www/next-build",
147147
"next-build": "next build",
148148
"next-start": "next start",

0 commit comments

Comments
 (0)