Skip to content

Commit 8592fe2

Browse files
committed
add EOL variant of alertbox
this is the current pattern to expose translations to MDX, from what i can tell
1 parent 496e243 commit 8592fe2

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import AlertBox from '@node-core/ui-components/Common/AlertBox';
2+
import { useTranslations } from 'next-intl';
3+
4+
import Link from '#site/components/Link';
5+
6+
const EOLAlert = () => {
7+
const t = useTranslations('components.endOfLife');
8+
return (
9+
<AlertBox level="warning">
10+
{t('intro')}{' '}
11+
<Link href="/eol">
12+
OpenJS Ecosystem Sustainability Program partner HeroDevs
13+
</Link>
14+
</AlertBox>
15+
);
16+
};
17+
18+
export default EOLAlert;

apps/site/next.mdx.use.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import BadgeGroup from '@node-core/ui-components/Common/BadgeGroup';
44

55
import DownloadReleasesTable from './components/Downloads/DownloadReleasesTable';
66
import UpcomingMeetings from './components/MDX/Calendar/UpcomingMeetings';
7+
import EOLAlertBox from './components/MDX/EOL/Alert';
78
import WithBadgeGroup from './components/withBadgeGroup';
89
import WithBanner from './components/withBanner';
910
import WithNodeRelease from './components/withNodeRelease';
@@ -25,4 +26,6 @@ export const mdxComponents = {
2526
BadgeGroup,
2627
// Renders an container for Upcoming Node.js Meetings
2728
UpcomingMeetings,
29+
// Renders an EOL alert
30+
EOLAlertBox,
2831
};

apps/site/pages/en/about/previous-releases.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ layout: about
55

66
# Node.js Releases
77

8+
<EOLAlertBox />
9+
810
Major Node.js versions enter _Current_ release status for six months, which gives library authors time to add support for them.
911
After six months, odd-numbered releases (9, 11, etc.) become unsupported, and even-numbered releases (10, 12, etc.) move to _Active LTS_ status and are ready for general use.
1012
_LTS_ release status is "long-term support", which typically guarantees that critical bugs will be fixed for a total of 30 months.
@@ -16,10 +18,6 @@ Production applications should only use _Active LTS_ or _Maintenance LTS_ releas
1618

1719
Full details regarding the Node.js release schedule are available [on GitHub](https://github.com/nodejs/release#release-schedule).
1820

19-
### Commercial Support
20-
21-
Commercial support for versions past the Maintenance phase is available through our OpenJS Ecosystem Sustainability Program partner [HeroDevs](https://www.herodevs.com/support/node-nes?utm_source=NodeJS+&utm_medium=Link&utm_campaign=Version_support_page).
22-
2321
## Looking for the latest release of a version branch?
2422

2523
<DownloadReleasesTable />

packages/i18n/src/locales/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@
259259
"subtitle": "The latest Node.js news, case studies, tutorials, and resources.",
260260
"rssLink": "RSS feed"
261261
}
262+
},
263+
"endOfLife": {
264+
"intro": "Commercial support for versions past the Maintenance LTS phase is available through our"
262265
}
263266
},
264267
"layouts": {

0 commit comments

Comments
 (0)