Skip to content

Commit

Permalink
Fixes for Algolia and Bootstrap
Browse files Browse the repository at this point in the history
- switch to instantsearch 7 API
- address breaking changes in boostrap 5
- fix: incorrect path parsing for 404 page search
- fix: race condition in global search bar initialization
- fix: honor system dark mode preference when no local preference is set
Also replaced pretty-quick with lint-staged, as new prettier is unsupported by the former
  • Loading branch information
josh-heyer committed Sep 27, 2023
1 parent 2f787d4 commit 0d319a5
Show file tree
Hide file tree
Showing 41 changed files with 1,601 additions and 1,166 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged --pattern 'src/**/*.js' --pattern 'gatsby-*.js'
npx lint-staged
3 changes: 2 additions & 1 deletion gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ exports.onRenderBody = ({ setPreBodyComponents }) => {
__html: `
const storedDark = window.localStorage.getItem('dark');
const inferredDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (storedDark === 'true' || (storedDark === null && inferredDark)) {
if (storedDark === 'true' || (storedDark !== false && inferredDark)) {
document.documentElement.classList.add('dark');
document.documentElement.dataset['bsTheme'] = 'dark';
}
`,
},
Expand Down
Loading

0 comments on commit 0d319a5

Please sign in to comment.