Skip to content

Commit

Permalink
chore: don't select any product area in doc microsite release notes (#…
Browse files Browse the repository at this point in the history
…2101)

* chore: don't select any product area in doc microsite release notes

* chore: changeset

* chore: fix link
  • Loading branch information
gabriele-ct authored Oct 4, 2024
1 parent 32f5fc9 commit 57d82f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/many-singers-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-docs/gatsby-theme-docs': patch
---

Add the ability to disable per microsite the productArea release notes filter.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { buildReleaseNotesQueryString } from '../utils/release-notes';
import { useSiteData } from './use-site-data';

const OTHER_GROUP_SITE_PREFIXES = []; // let's use pathPrefix to identify websites that point to others tab (works only on prod), docs-team asked to point all to product sofar
const NO_PRODUCT_AREA_SITE_PREFIXES = ['/docs']; // when matching these site prefixes, the productArea param will not be added to the release notes url
const RELEASE_NOTES_BASE_URL = '/docs/release-notes'; // only prod url

const useReleaseNotesConfig = () => {
Expand All @@ -16,7 +17,7 @@ const useReleaseNotesConfig = () => {
const queryString = buildReleaseNotesQueryString(
OTHER_GROUP_SITE_PREFIXES.includes(pathPrefix) ? 'other' : 'product',
product,
title
NO_PRODUCT_AREA_SITE_PREFIXES.includes(pathPrefix) ? undefined : title
);
return `${RELEASE_NOTES_BASE_URL}?${queryString}`;
};
Expand Down

0 comments on commit 57d82f7

Please sign in to comment.