Closed s1monj closed 3 years ago
Once the theme has been published, shadowing can be demonstrated using the updated custom-example
. There are a few additional steps to handle it. The following steps are to be done in the gatsby-site where the theme will be installed.
gatsby-browser.js
, we need to import bootstrap
and bootstrap/dist/css/bootstrap.min.css
. Both of them need to be imported or else the visual's and the dropdown wouldn't work. headerMenu
component need to be imported from the published theme as shown in the custom-example
.@VSevagen the Bootstrap upgrade caused some styling issues with buttons and alignment (see below) so for now I reverted/downgraded and we wont include dropdown with the demo - we can re-visit after Beta launch
@VSevagen How do I activate the shadowing - I tried mv custom-example src/user-site
and restarted gatsby develop but it didn't apply the changes? Does it need to be moved/named somewhere/something particular?
@VSevagen How do I activate the shadowing - I tried
mv custom-example src/user-site
and restarted gatsby develop but it didn't apply the changes? Does it need to be moved/named somewhere/something particular?
Shadowing works by overwriting the files from the node-modules/ once the theme has been installed. Since we did not publish the theme, I simulated the use of the theme using yarn workspaces and setup shadowing on it.
Right gotcha now this makes sense to me thanks
For example:
See shadowing: https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/shadowing/ https://dev.to/ekafyi/gatsby-theme-shadowing-for-beginners-how-i-built-a-starter-for-lekoarts-minimal-blog-theme-1lfm