File tree Expand file tree Collapse file tree 7 files changed +20
-2
lines changed
security/cloud-access-management Expand file tree Collapse file tree 7 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ title: 'v25.4 Changelog for Cloud'
4
4
description : ' Changelog for v25.4'
5
5
keywords : ['changelog', 'cloud']
6
6
sidebar_label : ' v25.4'
7
+ show_related_blogs : false
7
8
---
8
9
9
10
## Backward Incompatible Changes {#backward-incompatible-changes}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ title: 'v24.2 Changelog'
4
4
description : ' Fast release changelog for v24.2'
5
5
keywords : ['changelog']
6
6
sidebar_label : ' v24.2'
7
+ show_related_blogs : false
7
8
---
8
9
9
10
### ClickHouse release tag: 24.2.2.15987 {#clickhouse-release-tag-242215987}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ slug: /whats-new/cloud
3
3
sidebar_label : ' Cloud Changelog'
4
4
title : ' Cloud Changelog'
5
5
description : ' ClickHouse Cloud changelog providing descriptions of what is new in each ClickHouse Cloud release'
6
+ show_related_blogs : false
6
7
---
7
8
8
9
import Image from '@theme/IdealImage ';
Original file line number Diff line number Diff line change 2
2
slug : /cloud/security/cloud-access-management
3
3
title : ' Cloud Access Management'
4
4
description : ' Cloud Access Management Table Of Contents'
5
+ show_related_blogs : false
5
6
---
6
7
7
8
| Page | Description |
Original file line number Diff line number Diff line change @@ -369,6 +369,11 @@ const config = {
369
369
]
370
370
] ,
371
371
customFields : {
372
+ // add general slug paths here for which you don't want RelatedBlogs component to show
373
+ relatedBlogsIgnoreList : [
374
+ '/docs/sql-reference' ,
375
+ '/docs/engines'
376
+ ] ,
372
377
blogSidebarLink : "/docs/knowledgebase" , // Used for KB article page
373
378
galaxyApiEndpoint :
374
379
process . env . NEXT_PUBLIC_GALAXY_API_ENDPOINT || "http://localhost:3000" ,
Original file line number Diff line number Diff line change 2
2
.relatedBlogsContainer {
3
3
display : flex ;
4
4
flex-direction : column ;
5
+ padding-top : 32px ;
5
6
}
6
7
7
8
/* Container for just the cards (excluding header) */
Original file line number Diff line number Diff line change @@ -37,7 +37,12 @@ function useDocTOC() {
37
37
} ;
38
38
}
39
39
40
-
40
+ function isExcludedPath ( path , excludedSlugs ) {
41
+ // Check if any of the excluded components exist in the path
42
+ console . log ( path )
43
+ console . log ( excludedSlugs )
44
+ return excludedSlugs . some ( component => path . includes ( component ) ) ;
45
+ }
41
46
export default function DocItemLayout ( { children} ) {
42
47
const docTOC = useDocTOC ( ) ;
43
48
const { metadata, frontMatter} = useDoc ( ) ;
@@ -46,6 +51,9 @@ export default function DocItemLayout({children}) {
46
51
const location = useLocation ( ) ;
47
52
const context = useDocusaurusContext ( ) ;
48
53
54
+ console . log ( context )
55
+ const excludeRelatedComponents = isExcludedPath ( location . pathname , context . siteConfig . customFields . relatedBlogsIgnoreList )
56
+
49
57
const [ showPopup , setShowPopup ] = useState ( false )
50
58
useEffect ( ( ) => {
51
59
@@ -108,7 +116,7 @@ export default function DocItemLayout({children}) {
108
116
< DocItemContent > { children } </ DocItemContent >
109
117
< DocItemFooter />
110
118
</ article >
111
- { frontMatter . show_related_blogs === false ? < > </ > : < RelatedBlogs frontMatter = { frontMatter } /> }
119
+ { ( excludeRelatedComponents === true || frontMatter . show_related_blogs === false ) ? < > </ > : < RelatedBlogs frontMatter = { frontMatter } /> }
112
120
< DocItemPaginator />
113
121
</ div >
114
122
</ div >
You can’t perform that action at this time.
0 commit comments