A visual interface to configure your Gatsby site.
$ npm install gatsby-admin
A visual interface to configure your Gatsby site.
The Admin app itself is a standard Gatsby site. It fetches its data from the Recipes GraphQL server, which exposes all the information we need about the Gatsby site.
It uses theme-ui (with the strict-ui experiment) and gatsby-interface to style the app and urql to fetch the data from the GraphQL server.
The easiest way to work on Admin locally is to develop Admin itself.
yarn
in the root folderyarn workspace gatsby-admin run develop
If you see eslint errors you'll need to temporarily replace all references to
___loader
withwindow.___loader
inpackages/gatsby-link/index.js
.
To try Admin with one of your sites locally, use the gatsby-dev-cli
to copy the local versions of gatsby
, gatsby-cli
, gatsby-recipes
, gatsby-core-utils
and gatsby-admin
into your project:
# Make sure to build the latest local versions of all packages
~/gatsby
yarn run watch
~/my-gatsby-site
$ gatsby-dev --packages gatsby gatsby-cli gatsby-recipes gatsby-core-utils gatsby-admin
# In another tab, start your site with the Admin feature flag set
~/my-gatsby-site
$ GATSBY_EXPERIMENTAL_ENABLE_ADMIN=true gatsby develop
Then visit localhost:8000/\_\_\_admin
and you should see Gatsby Admin for your site!
© 2010 - cnpmjs.org x YWFE | Home | YWFE