Skip to content

Commit 289e796

Browse files
authored
Merge branch 'main' into patch-2
2 parents 4aae3c4 + 775888e commit 289e796

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# nodejs/learn
22

3-
Source content for the Node.js learning guides, published at https://nodejs.github.io/learn.
3+
Source content for the Node.js learning guides, published at https://nodejs.org/learn.
44

55
This repository was created as part of
66
[nodejs/nodejs.org#8612](https://github.com/nodejs/nodejs.org/issues/8612)

components/Layout/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default ({ metadata, headings, readingTime, children }) => (
2323
<>
2424
<Analytics basePath="/learn/_vercel" />
2525
<SpeedInsights basePath="/learn/_vercel" />
26-
<NavBar />
26+
<NavBar metadata={metadata} />
2727
<Article>
2828
<SideBar metadata={metadata} />
2929
<div>

components/Navigation/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import Logo from '#theme/Logo';
1111
/**
1212
* NavBar component that displays the headings, search, etc.
1313
*/
14-
export default () => {
15-
const [theme, toggleTheme] = useTheme();
14+
export default ({ metadata }) => {
15+
const [themePreference, setThemePreference] = useTheme();
1616

1717
return (
1818
<NavBar
@@ -36,10 +36,10 @@ export default () => {
3636
},
3737
]}
3838
>
39-
<SearchBox />
39+
<SearchBox pathname={metadata.path} />
4040
<ThemeToggle
41-
onClick={toggleTheme}
42-
aria-label={`Switch to ${theme === 'light' ? 'dark' : 'light'} theme`}
41+
onChange={setThemePreference}
42+
currentTheme={themePreference}
4343
/>
4444
<a
4545
href={`https://github.com/nodejs/learn`}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"devDependencies": {
1111
"@eslint/js": "^10.0.1",
12-
"@node-core/doc-kit": "1.3.0",
12+
"@node-core/doc-kit": "1.3.1",
1313
"@node-core/remark-lint": "^1.3.0",
1414
"eslint": "^10.1.0",
1515
"eslint-plugin-mdx": "^3.7.0",

0 commit comments

Comments
 (0)