From 3e0ebdb98322bfb5932693040a5de4e6bb994f28 Mon Sep 17 00:00:00 2001 From: gkLeo Date: Mon, 9 Dec 2024 11:13:03 +0800 Subject: [PATCH 1/2] Update contents to align with the restructured XM Cloud Foundation Head repository. --- .../xm-cloud/appendix-ii/example-code/xmcloud-build-json.md | 2 +- .../developer-considerations/dev-workflow-codespaces.md | 2 +- .../project-architecture/rate-limits-and-caching.md | 6 +++--- .../getting-started/xm-cloud/tutorials/create-a-site.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/markdown/pages/learn/accelerate/xm-cloud/appendix-ii/example-code/xmcloud-build-json.md b/data/markdown/pages/learn/accelerate/xm-cloud/appendix-ii/example-code/xmcloud-build-json.md index ad64893f8..4fd55f96a 100644 --- a/data/markdown/pages/learn/accelerate/xm-cloud/appendix-ii/example-code/xmcloud-build-json.md +++ b/data/markdown/pages/learn/accelerate/xm-cloud/appendix-ii/example-code/xmcloud-build-json.md @@ -14,7 +14,7 @@ lastUpdated: '2024-01-11' "deployItems": ["*.module.json"], "renderingHosts": { "xmcloudpreview": { - "path": "./src/sxastarter", + "path": "./headapps/nextjs-starter", "nodeVersion": "16.15.1", "jssDeploymentSecret": "110F1C44A496B45478640DD36F80C18C9", "enabled": true, diff --git a/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/developer-considerations/dev-workflow-codespaces.md b/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/developer-considerations/dev-workflow-codespaces.md index 27ec95589..3fa3c90c7 100644 --- a/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/developer-considerations/dev-workflow-codespaces.md +++ b/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/developer-considerations/dev-workflow-codespaces.md @@ -100,7 +100,7 @@ This will pull the repository into the Codespace ready to run. Before running, t To run the web application, first the developer needs to configure the environment variables for the solution. -In Codespaces (or VS Code), navigate to the folder containing your Next.js application. In the starter kit, this is located at `./src/sxastarter`. +In Codespaces (or VS Code), navigate to the folder containing your Next.js application. In the starter kit, this is located at `./headapps/nextjs-starter`. Add an `.env.local` file and populate the following environment variables with the values from your XM Cloud instance (do not commit these changes back to the repository): diff --git a/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/project-architecture/rate-limits-and-caching.md b/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/project-architecture/rate-limits-and-caching.md index 0a8e1fdfe..e13bf6278 100644 --- a/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/project-architecture/rate-limits-and-caching.md +++ b/data/markdown/pages/learn/accelerate/xm-cloud/pre-development/project-architecture/rate-limits-and-caching.md @@ -95,13 +95,13 @@ This will increase overall build time but can reduce the amount of concurrent re To reduce the number of requests to Experience Edge, you can tune the web application cache in the following areas: -- [Dictionary service](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/src/sxastarter/src/lib/dictionary-service-factory.ts#L20) +- [Dictionary service](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/headapps/nextjs-starter/src/lib/dictionary-service-factory.ts#L20) - The default `cacheTimeout` is 60 seconds, you can increase this to reduce the number of requests to Experience Edge. - Increase `pageSize` (10 default) - this value can go up to 1000 depending on how many dictionary items you have -- [Personalize middleware](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/src/sxastarter/src/lib/middleware/plugins/personalize.ts#L26) +- [Personalize middleware](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/headapps/nextjs-starter/src/lib/middleware/plugins/personalize.ts#L24) - Increase the default `cacheTimeout` (10s default) - If your client is not using Embedded Personalization, disable or remove the middleware -- [Redirects middleware](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/src/sxastarter/src/lib/middleware/plugins/redirects.ts#L12) +- [Redirects middleware](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/headapps/nextjs-starter/src/lib/middleware/plugins/redirects.ts#L12) - Increase the default `cacheTimeout` (10s default) - If you are not using (SXA) redirects, you can disable or remove the middleware diff --git a/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md b/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md index 2d43bc7b4..41de59d26 100644 --- a/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md +++ b/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md @@ -105,7 +105,7 @@ The init script initializes the `.env` file with everything necessary. As you may remember from the introduction in the previous tutorial, you need to use a [GraphQL endpoint](https://doc.sitecore.com/xmc/en/developers/jss/latest/jss-xmc/jss-graphql-api.html) to query the content coming from XM Cloud. To connect to the endpoint, a few things need to be configured up front. -1. Navigate to the `.env` file within your solution under src\sxastarter, and copy it. +1. Navigate to the `.env` file within your solution under headapps\nextjs-starter, and copy it. 1. Name it `.env.local`. We do this so that the file is ignored by git by default, so that you do not pass valuable configuration secrets into any repositories. @@ -128,7 +128,7 @@ Now, you need to set the API key within `.env.local`. The API key should be alre 1. Add the Site name (e.g. `Company dev`) to the `SITECORE_SITE_NAME` environment variable in the `.env.local` file. -1. In your terminal navigate to src/sxastarter (your app folder) and run `npm install` +1. In your terminal navigate to headapps\nextjs-starter (your app folder) and run `npm install` 1. Now run `npm run start:connected` From 150a6f110f828efbbfeee8d97d850f04bb42e1d3 Mon Sep 17 00:00:00 2001 From: gkLeo Date: Mon, 9 Dec 2024 16:59:22 +0800 Subject: [PATCH 2/2] fixed typo --- .../learn/getting-started/xm-cloud/tutorials/create-a-site.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md b/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md index 41de59d26..b699a1636 100644 --- a/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md +++ b/data/markdown/pages/learn/getting-started/xm-cloud/tutorials/create-a-site.md @@ -128,7 +128,7 @@ Now, you need to set the API key within `.env.local`. The API key should be alre 1. Add the Site name (e.g. `Company dev`) to the `SITECORE_SITE_NAME` environment variable in the `.env.local` file. -1. In your terminal navigate to headapps\nextjs-starter (your app folder) and run `npm install` +1. In your terminal navigate to headapps/nextjs-starter (your app folder) and run `npm install` 1. Now run `npm run start:connected`