diff --git a/packages/gatsby-plugin-nprogress/README.md b/packages/gatsby-plugin-nprogress/README.md index dad6979c7028b..3e74780ecf623 100644 --- a/packages/gatsby-plugin-nprogress/README.md +++ b/packages/gatsby-plugin-nprogress/README.md @@ -18,7 +18,13 @@ plugins: [ options: { // Setting a color is optional. color: `tomato`, + // Disable the loading spinner. + showSpinner: false, } } ] ``` + +In addition to `color` – a configuration option specific to +`gatsby-plugin-nprogress` that saves some time [customizing the nprogress CSS](https://github.com/rstacruz/nprogress#customization) to match your site +colors – you may pass all available [nprogress configuration options](https://github.com/rstacruz/nprogress#configuration). diff --git a/packages/gatsby-plugin-nprogress/src/gatsby-browser.js b/packages/gatsby-plugin-nprogress/src/gatsby-browser.js index 75a6d4159003c..86caff7f7d453 100644 --- a/packages/gatsby-plugin-nprogress/src/gatsby-browser.js +++ b/packages/gatsby-plugin-nprogress/src/gatsby-browser.js @@ -2,6 +2,7 @@ import NProgress from "nprogress" exports.onClientEntry = (a, pluginOptions = { color: `#29d` }) => { window.___emitter.on(`onDelayedLoadPageResources`, () => { + NProgress.configure(pluginOptions) NProgress.start() }) window.___emitter.on(`onPostLoadPageResources`, () => {