diff --git a/BUILDING.md b/BUILDING.md index 45d062f285ec99..e169d7cfe04557 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -462,6 +462,12 @@ make docopen This will open a file URL to a one-page version of all the browsable HTML documents using the default browser. +```bash +make docclean +``` + +This will clean previously built doc. + To test if Node.js was built correctly: ```bash diff --git a/doc/api_assets/api.js b/doc/api_assets/api.js index c7568206e29f19..8b40042f85cbae 100644 --- a/doc/api_assets/api.js +++ b/doc/api_assets/api.js @@ -2,11 +2,11 @@ { function setupTheme() { - const kCustomPreference = 'customDarkTheme'; - const userSettings = sessionStorage.getItem(kCustomPreference); + const storedTheme = localStorage.getItem('theme'); const themeToggleButton = document.getElementById('theme-toggle-btn'); - if (userSettings === null && window.matchMedia) { + // Follow operating system theme preference + if (storedTheme === null && window.matchMedia) { const mq = window.matchMedia('(prefers-color-scheme: dark)'); if ('onchange' in mq) { @@ -28,16 +28,16 @@ if (mq.matches) { document.documentElement.classList.add('dark-mode'); } - } else if (userSettings === 'true') { + } else if (storedTheme === 'dark') { document.documentElement.classList.add('dark-mode'); } if (themeToggleButton) { themeToggleButton.hidden = false; themeToggleButton.addEventListener('click', function() { - sessionStorage.setItem( - kCustomPreference, - document.documentElement.classList.toggle('dark-mode'), + localStorage.setItem( + 'theme', + document.documentElement.classList.toggle('dark-mode') ? 'dark' : 'light', ); }); } diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 2ecf14a082dc3b..2bf751b7076139 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -532,9 +532,10 @@ The TSC serves as the final arbiter where required. [build](https://github.com/nodejs/build/issues) repositories, open new issues. Run a new CI any time someone pushes new code to the pull request. 4. Check that the commit message adheres to [commit message guidelines][]. -5. Add all necessary [metadata](#metadata) to commit messages before landing. If - you are unsure exactly how to format the commit messages, use the commit log - as a reference. See [this commit][commit-example] as an example. +5. Add all necessary [metadata][git-node-metadata] to commit messages before + landing. If you are unsure exactly how to format the commit messages, use + the commit log as a reference. See [this commit][commit-example] as an + example. For pull requests from first-time contributors, be [welcoming](#welcoming-first-time-contributors). Also, verify that their git