diff --git a/components/Home/HomeDownloadButton.tsx b/components/Home/HomeDownloadButton.tsx
index 707a4a4456c3e..9cd9568b1265d 100644
--- a/components/Home/HomeDownloadButton.tsx
+++ b/components/Home/HomeDownloadButton.tsx
@@ -1,5 +1,3 @@
-import Link from 'next/link';
-
import LocalisedLink from '../LocalisedLink';
import { useNextraContext } from '../../hooks/useNextraContext';
import { getNodejsChangelog } from '../../util/getNodeJsChangelog';
@@ -25,7 +23,7 @@ const HomeDownloadButton = (props: HomeDownloadButtonProps) => {
return (
-
{
>
{props.nodeNumeric} {labels[props.isLts ? 'lts' : 'current']}
{labels[`tagline-${props.isLts ? 'lts' : 'current'}`]}
-
+
-
diff --git a/package-lock.json b/package-lock.json
index ce90a4f350c20..cef3756f7fedf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,6 @@
"license": "MIT",
"dependencies": {
"@mdx-js/react": "^2.3.0",
- "@next/font": "^13.2.3",
"classnames": "^2.3.2",
"feed": "^4.2.2",
"gray-matter": "^4.0.3",
@@ -653,11 +652,6 @@
"glob": "7.1.7"
}
},
- "node_modules/@next/font": {
- "version": "13.2.3",
- "resolved": "https://registry.npmjs.org/@next/font/-/font-13.2.3.tgz",
- "integrity": "sha512-7EHzk0f7FVYICLUZTpyPk93IfcTUao++Xt1Sgb+Zk5dVOCYHabqLtlF5ywSoXIqyFlo0qlshEBxsrzHAGTWkDw=="
- },
"node_modules/@next/swc-android-arm-eabi": {
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.3.tgz",
diff --git a/package.json b/package.json
index b490669b5188c..761896942dedb 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,6 @@
},
"dependencies": {
"@mdx-js/react": "^2.3.0",
- "@next/font": "^13.2.3",
"classnames": "^2.3.2",
"feed": "^4.2.2",
"gray-matter": "^4.0.3",
diff --git a/theme.tsx b/theme.tsx
index 38d276f9f8f2b..d77498322def2 100644
--- a/theme.tsx
+++ b/theme.tsx
@@ -1,6 +1,7 @@
import React, { useEffect } from 'react';
import { MDXProvider } from '@mdx-js/react';
import highlightJs from 'highlight.js/lib/common';
+import { useRouter } from 'next/router';
import type { NextraThemeLayoutProps } from 'nextra';
import type { MDXComponents } from 'mdx/types';
@@ -27,7 +28,10 @@ const mdxComponents: MDXComponents = {
};
const Content = ({ children }: LayoutProps) => {
- useEffect(() => highlightJs.highlightAll(), []);
+ const { asPath } = useRouter();
+
+ // Re-highlights the pages on route change
+ useEffect(() => highlightJs.highlightAll(), [asPath]);
useEffect(() => window.startLegacyApp(), []);
diff --git a/util/sourceSansPro.ts b/util/sourceSansPro.ts
index 9e446b30d3c7b..0664c21a7496b 100644
--- a/util/sourceSansPro.ts
+++ b/util/sourceSansPro.ts
@@ -1,4 +1,4 @@
-import { Source_Sans_Pro } from '@next/font/google';
+import { Source_Sans_Pro } from 'next/font/google';
const sourceSansPro = Source_Sans_Pro({
weight: ['400', '600'],