{"id":18836018,"url":"https://github.com/wkovacs64/gatsby-plugin-use-dark-mode","last_synced_at":"2025-10-20T10:48:36.741Z","repository":{"id":37470719,"uuid":"174579346","full_name":"wKovacs64/gatsby-plugin-use-dark-mode","owner":"wKovacs64","description":"Gatsby plugin to prevent a flash of default styles when using the use-dark-mode hook","archived":false,"fork":false,"pushed_at":"2025-10-19T01:12:51.000Z","size":26320,"stargazers_count":48,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T02:50:05.257Z","etag":null,"topics":["dark-mode","gatsby","gatsby-plugin","plugin","react","react-hooks","theming"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wKovacs64.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"wKovacs64"}},"created_at":"2019-03-08T17:21:26.000Z","updated_at":"2025-10-19T01:12:54.000Z","dependencies_parsed_at":"2022-07-12T15:50:35.969Z","dependency_job_id":"c4350c8d-4cd1-49ad-a2a3-9f4654b2e3b0","html_url":"https://github.com/wKovacs64/gatsby-plugin-use-dark-mode","commit_stats":{"total_commits":1274,"total_committers":5,"mean_commits":254.8,"dds":"0.43171114599686033","last_synced_commit":"70851017d4d7fd488ae0ce44869a00c8b9755bb2"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/wKovacs64/gatsby-plugin-use-dark-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fgatsby-plugin-use-dark-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fgatsby-plugin-use-dark-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fgatsby-plugin-use-dark-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fgatsby-plugin-use-dark-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wKovacs64","download_url":"https://codeload.github.com/wKovacs64/gatsby-plugin-use-dark-mode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fgatsby-plugin-use-dark-mode/sbom","scorecard":{"id":779051,"data":{"date":"2025-07-21","repo":{"name":"github.com/wKovacs64/gatsby-plugin-use-dark-mode","commit":"b278c00ab939762fae21b12716b8567352f2de22"},"scorecard":{"version":"v5.2.1-24-gc29a04d4","commit":"c29a04d46d1570393e94662bc34e9906398e1bfa"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:99: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:28","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:47","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:66","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:85","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:106","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-9pv7-vfvm-6vr7","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-7hpj-7hhx-2fgx","Warn: Project is vulnerable to: GHSA-fjgf-rc76-4x9p","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f9xv-q969-pqx4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T04:26:06.565Z","repository_id":37470719,"created_at":"2025-08-23T04:26:06.565Z","updated_at":"2025-08-23T04:26:06.565Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280080684,"owners_count":26268353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dark-mode","gatsby","gatsby-plugin","plugin","react","react-hooks","theming"],"created_at":"2024-11-08T02:17:57.579Z","updated_at":"2025-10-20T10:48:36.687Z","avatar_url":"https://github.com/wKovacs64.png","language":"TypeScript","funding_links":["https://github.com/sponsors/wKovacs64"],"categories":[],"sub_categories":[],"readme":"# [gatsby-plugin-use-dark-mode][home]\n\n[![npm version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url]\n\nA [Gatsby][gatsby] plugin to prevent a flash of default styles when using the [`use-dark-mode`][udm]\nhook if the user is not using the default theme. Specifically, this plugin handles the injection of\nthe [`noflash.js`][udm-noflash] logic.\n\n## Install\n\n```sh\nnpm install gatsby-plugin-use-dark-mode use-dark-mode\n```\n\n## Usage\n\nAdd the plugin to your `gatsby-config.js`.\n\n\u003c!-- prettier-ignore --\u003e\n```js\nmodule.exports = {\n  plugins: [\n    'gatsby-plugin-use-dark-mode',\n  ],\n};\n```\n\nFollow the [`use-dark-mode`][udm] documentation for further instructions.\n\n### Advanced Configuration\n\nIf you would like to change the class names that are applied, specify the storage key, or skip the\nscript minification process, you may do so through plugin options:\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-use-dark-mode',\n      options: {\n        classNameDark: 'dark-mode',\n        classNameLight: 'light-mode',\n        storageKey: 'darkMode',\n        minify: true,\n      },\n    },\n  ],\n};\n```\n\n\u003e Note: You will also need to pass the corresponding [options to `useDarkMode`][udm-parameters].\n\n## Limitations\n\n[`useDarkMode`][udm] can be [configured][udm-parameters] to specify which DOM element receives the\nclass and to use an alternate storage provider if desired. This plugin does not currently support\nthose options, so it will only work if you are using the defaults (`document.body` and\n`localStorage`).\n\n[home]: https://github.com/wKovacs64/gatsby-plugin-use-dark-mode\n[npm-image]: https://img.shields.io/npm/v/gatsby-plugin-use-dark-mode.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/gatsby-plugin-use-dark-mode\n[ci-image]:\n  https://img.shields.io/github/actions/workflow/status/wKovacs64/gatsby-plugin-use-dark-mode/ci.yml?logo=github\u0026style=flat-square\n[ci-url]: https://github.com/wKovacs64/gatsby-plugin-use-dark-mode/actions?query=workflow%3Aci\n[gatsby]: https://www.gatsbyjs.org\n[udm]: https://github.com/donavon/use-dark-mode#readme\n[udm-noflash]: https://github.com/donavon/use-dark-mode#that-flash\n[udm-parameters]: https://github.com/donavon/use-dark-mode#parameters\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkovacs64%2Fgatsby-plugin-use-dark-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkovacs64%2Fgatsby-plugin-use-dark-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkovacs64%2Fgatsby-plugin-use-dark-mode/lists"}