@patternfly/documentation-framework 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/templates/mdx.js +19 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 5.0.3 (2023-06-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 5.0.2 (2023-06-26)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/documentation-framework",
|
|
3
3
|
"description": "A framework to build documentation for PatternFly.",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react": "^17.0.0 || ^18.0.0",
|
|
88
88
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "9667d4646deaca2e90d4c8fa34aa090af1b07233"
|
|
91
91
|
}
|
package/templates/mdx.js
CHANGED
|
@@ -51,6 +51,17 @@ const MDXChildTemplate = ({
|
|
|
51
51
|
}
|
|
52
52
|
ensureID(toc);
|
|
53
53
|
}
|
|
54
|
+
const innerContentWrapperClass = () => {
|
|
55
|
+
console.log(source);
|
|
56
|
+
if (source === 'landing-page') {
|
|
57
|
+
return 'landing-pages';
|
|
58
|
+
}
|
|
59
|
+
if (source === 'release-notes') {
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
return 'ws-mdx-content-content'
|
|
63
|
+
};
|
|
64
|
+
|
|
54
65
|
const InlineAlerts = (
|
|
55
66
|
<React.Fragment>
|
|
56
67
|
{optIn && (
|
|
@@ -83,7 +94,7 @@ const MDXChildTemplate = ({
|
|
|
83
94
|
<TableOfContents items={toc} />
|
|
84
95
|
)}
|
|
85
96
|
<div className="ws-mdx-content">
|
|
86
|
-
<div className={
|
|
97
|
+
<div className={innerContentWrapperClass()}>
|
|
87
98
|
{InlineAlerts}
|
|
88
99
|
<Component />
|
|
89
100
|
{functionDocumentation.length > 0 && (
|
|
@@ -155,7 +166,7 @@ export const MDXTemplate = ({
|
|
|
155
166
|
const sourceKeys = Object.keys(tabNames);
|
|
156
167
|
const isSinglePage = sourceKeys.length === 1;
|
|
157
168
|
|
|
158
|
-
let isDevResources, isComponent, isExtension, isChart, isPattern, isLayout, isUtility;
|
|
169
|
+
let isDevResources, isComponent, isExtension, isChart, isPattern, isLayout, isUtility, isUpgrade;
|
|
159
170
|
|
|
160
171
|
const getSection = () => {
|
|
161
172
|
return sources.some((source) => {
|
|
@@ -181,6 +192,11 @@ export const MDXTemplate = ({
|
|
|
181
192
|
case "utilities":
|
|
182
193
|
isUtility = true;
|
|
183
194
|
return;
|
|
195
|
+
case "get-started":
|
|
196
|
+
if (source.source.includes('upgrade')) {
|
|
197
|
+
isUpgrade = true;
|
|
198
|
+
}
|
|
199
|
+
return;
|
|
184
200
|
}
|
|
185
201
|
});
|
|
186
202
|
};
|
|
@@ -216,7 +232,7 @@ export const MDXTemplate = ({
|
|
|
216
232
|
return "pf-m-light-100";
|
|
217
233
|
}
|
|
218
234
|
return "pf-m-light";
|
|
219
|
-
} else if (isUtility || isPattern || isLayout || isComponent) {
|
|
235
|
+
} else if (isUtility || isPattern || isLayout || isComponent || isUpgrade) {
|
|
220
236
|
return "pf-m-light";
|
|
221
237
|
}
|
|
222
238
|
return "pf-m-light-100";
|