From b4ea0fcc5dadcd3a2984e6e51a899a734ca0ebdc Mon Sep 17 00:00:00 2001 From: melindafekete Date: Wed, 6 Nov 2024 17:36:19 +0100 Subject: [PATCH 01/11] Add lastmod to sitemap --- website/docusaurus.config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 78829920dd30..4dd9ba4cc423 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -305,6 +305,16 @@ const config: Config = { googleTagManager: { containerId: 'GTM-KV5PRR2', }, + sitemap: { + lastmod: 'datetime', + changefreq: 'weekly', + priority: 0.5, + createSitemapItems: async (params) => { + const {defaultCreateSitemapItems, ...rest} = params; + const items = await defaultCreateSitemapItems(rest); + return items.filter((item) => !item.url.includes('/page/')); + }, + }, }, ], ], From 2207ecee304c54b69dbc3f54f69313a16f92d3e0 Mon Sep 17 00:00:00 2001 From: melindafekete Date: Wed, 6 Nov 2024 18:11:12 +0100 Subject: [PATCH 02/11] Remove lastmod to test if xml otherwise generated identically --- website/docusaurus.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 4dd9ba4cc423..0fdfb11db96c 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -306,7 +306,6 @@ const config: Config = { containerId: 'GTM-KV5PRR2', }, sitemap: { - lastmod: 'datetime', changefreq: 'weekly', priority: 0.5, createSitemapItems: async (params) => { From 4e6a2b2265a8250121f759e3a9493ed1f789fa02 Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 10:59:02 +0100 Subject: [PATCH 03/11] Add date back in --- website/docusaurus.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 0fdfb11db96c..b1de52ab3507 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -307,6 +307,7 @@ const config: Config = { }, sitemap: { changefreq: 'weekly', + lastMod: 'date', priority: 0.5, createSitemapItems: async (params) => { const {defaultCreateSitemapItems, ...rest} = params; From 1f739ed68e0287bc1caaa6343b613bbd96da93a6 Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 11:49:14 +0100 Subject: [PATCH 04/11] Fix label for lastmod --- website/docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index b1de52ab3507..d7276ec3d3ed 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -307,7 +307,7 @@ const config: Config = { }, sitemap: { changefreq: 'weekly', - lastMod: 'date', + lastmod: 'date', priority: 0.5, createSitemapItems: async (params) => { const {defaultCreateSitemapItems, ...rest} = params; From cf2903af61a59fca91d342bbd318d8f4e3e3b21f Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 12:34:07 +0100 Subject: [PATCH 05/11] Tell github actions to fetch entire git history for docs build --- .github/workflows/build_doc_prs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_doc_prs.yaml b/.github/workflows/build_doc_prs.yaml index 9166157433bd..aa26c12d16be 100644 --- a/.github/workflows/build_doc_prs.yaml +++ b/.github/workflows/build_doc_prs.yaml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build docs env: UNLEASH_FEEDBACK_TARGET_URL: ${{ secrets.DOCS_FEEDBACK_TARGET_URL }} From 91c1384713486bb0836bed6bf78cf2b8febf9c03 Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 12:43:23 +0100 Subject: [PATCH 06/11] Fix linting issue docusaurus --- website/docusaurus.config.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index d7276ec3d3ed..1ed84a33897a 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -310,11 +310,13 @@ const config: Config = { lastmod: 'date', priority: 0.5, createSitemapItems: async (params) => { - const {defaultCreateSitemapItems, ...rest} = params; - const items = await defaultCreateSitemapItems(rest); - return items.filter((item) => !item.url.includes('/page/')); + const { defaultCreateSitemapItems, ...rest } = params; + const items = await defaultCreateSitemapItems(rest); + return items.filter( + (item) => !item.url.includes('/page/'), + ); }, - }, + }, }, ], ], From 83d291500477edb4a3cadee69343a3e857c040fb Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 13:00:34 +0100 Subject: [PATCH 07/11] Test is lastUpdated works correctly --- website/docusaurus.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 1ed84a33897a..34c1ced8c626 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -295,6 +295,7 @@ const config: Config = { remarkPlugins: [[pluginNpm2Yarn, { sync: true }]], docItemComponent: '@theme/ApiItem', sidebarPath: './sidebars.ts', + showLastUpdateTime: true }, theme: { customCss: './src/css/custom.css', From 1bc726cb7e950ef84555f3923b9280c2e0d4b8c3 Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 13:19:59 +0100 Subject: [PATCH 08/11] Fix formatting again --- website/docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 34c1ced8c626..ec8f1f5a9245 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -295,7 +295,7 @@ const config: Config = { remarkPlugins: [[pluginNpm2Yarn, { sync: true }]], docItemComponent: '@theme/ApiItem', sidebarPath: './sidebars.ts', - showLastUpdateTime: true + showLastUpdateTime: true, }, theme: { customCss: './src/css/custom.css', From 3910022c66b0b6bbc34d90985bc0d13a7479808a Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 16:22:18 +0100 Subject: [PATCH 09/11] Remove fetch depth from docs build workflow --- .github/workflows/build_doc_prs.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build_doc_prs.yaml b/.github/workflows/build_doc_prs.yaml index aa26c12d16be..9166157433bd 100644 --- a/.github/workflows/build_doc_prs.yaml +++ b/.github/workflows/build_doc_prs.yaml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Build docs env: UNLEASH_FEEDBACK_TARGET_URL: ${{ secrets.DOCS_FEEDBACK_TARGET_URL }} From 6f61a6265a5005ce27279a27430a8c5078307ebc Mon Sep 17 00:00:00 2001 From: melindafekete Date: Thu, 7 Nov 2024 16:50:26 +0100 Subject: [PATCH 10/11] Test if changing an actual file still skips the build --- website/docs/feature-flag-tutorials/flutter/a-b-testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/feature-flag-tutorials/flutter/a-b-testing.md b/website/docs/feature-flag-tutorials/flutter/a-b-testing.md index 67fb051ee695..73a782f17260 100644 --- a/website/docs/feature-flag-tutorials/flutter/a-b-testing.md +++ b/website/docs/feature-flag-tutorials/flutter/a-b-testing.md @@ -22,7 +22,7 @@ In your Unleash instance, create a new feature flag called `likeOptionExperiment ![Set Up Variant in Unleash](/img/variant-setup-1.png) -Now that you have created your feature flag, let’s create two new [variants](https://docs.getunleash.io/reference/feature-toggle-variants) “gridTile'' and “imageDetails” respectively. These variants will help you position your “like image” button. +Now that you have created your feature flag, let’s create two new [variants](https://docs.getunleash.io/reference/feature-toggle-variants) `gridTile` and `imageDetails` respectively. These variants will help you position your **like image** button. ![Succesfully setting up variant in Unleash](/img/setup-variant-2.png) @@ -34,7 +34,7 @@ Below is a screenshot of experimentation in action based on the `likeOptionExper For analytics and metrics, we’ll use [Mixpanel](https://mixpanel.com/) to track user behavior and usage patterns. We have chosen Mixpanel because it offers a user-friendly setup and in-depth user analytics and segmentation. Given that the project follows clean architecture and Test-Driven Development (TDD) principles, you’ll want to create an abstract layer to interact with the Mixpanel. -Whenever a user opens the app, we track `like-variant` if `likeOptionExperiment` is enabled to tag them with their assigned variant (gridTile or imageDetails). The stored variant in Mixpanel can be used later to analyze how each variant impacts user behavior to like an image. +Whenever a user opens the app, we track `like-variant` if `likeOptionExperiment` is enabled to tag them with their assigned variant (`gridTile` or `imageDetails`). The stored variant in Mixpanel can be used later to analyze how each variant impacts user behavior to like an image. Whenever a user interacts with the `LikeButton`, we track `trackLikeEventForExperimentation`, along with their assigned variants. By correlating the `trackLikeEventForExperimentation` with the `like-variant`, you can effectively measure the impact of a variant on user behavior and make data-driven decisions. To learn how to correlate and generate reports, see the [Mixpanel docs](https://docs.mixpanel.com/docs/analysis/reports). From bfa30553b842d4081b029968ea7a7cc8638f170d Mon Sep 17 00:00:00 2001 From: melindafekete Date: Fri, 8 Nov 2024 09:56:38 +0100 Subject: [PATCH 11/11] Remove lastupdated from bottom of pages --- website/docusaurus.config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index ec8f1f5a9245..39f98d0c406f 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -294,8 +294,7 @@ const config: Config = { routeBasePath: '/', remarkPlugins: [[pluginNpm2Yarn, { sync: true }]], docItemComponent: '@theme/ApiItem', - sidebarPath: './sidebars.ts', - showLastUpdateTime: true, + sidebarPath: './sidebars.ts' }, theme: { customCss: './src/css/custom.css',