Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions components/Home/HomeDownloadButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Link from 'next/link';

import LocalisedLink from '../LocalisedLink';
import { useNextraContext } from '../../hooks/useNextraContext';
import { getNodejsChangelog } from '../../util/getNodeJsChangelog';
Expand All @@ -25,15 +23,15 @@ const HomeDownloadButton = (props: HomeDownloadButtonProps) => {

return (
<div className="home-downloadblock">
<Link
<a
href={nodeDownloadLink}
className="home-downloadbutton"
title={nodeDownloadTitle}
data-version={props.node}
>
{props.nodeNumeric} {labels[props.isLts ? 'lts' : 'current']}
<small>{labels[`tagline-${props.isLts ? 'lts' : 'current'}`]}</small>
</Link>
</a>

<ul className="list-divider-pipe home-secondary-links">
<li>
Expand Down
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion theme.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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(), []);

Expand Down
2 changes: 1 addition & 1 deletion util/sourceSansPro.ts
Original file line number Diff line number Diff line change
@@ -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'],
Expand Down