
This feature opens up a world of possibilities for customizing FlexiBlog or any other Gatsby theme. You can copy any component directly from the theme and modify it, or create your own component to replace the theme’s components entirely.
To use Component Shadowing, you need to manually locate the paths in a theme and create the correct shadowing paths in your site. Here’s a basic guide to help you get started:
site/src/[YOUR-THEME-NAME]/[PACKAGE-NAME]/[FILE-PATH]
.Here are some examples to illustrate the correct shadow paths:
Original Path: packages/flow-ui/flow-ui-components/src/ContactForm/ContactForm.jsx
Shadow Path: site/src/@elegantstack/flow-ui-components/ContactForm/ContactForm.jsx
Original Path: packages/common/gatsby-common-helpers/src/useForm.jsx
Shadow Path: site/src/@elegantstack/gatsby-common-helpers/useForm.jsx
Original Path: packages/flow-ui/flow-ui-theme/src/theme/colors.js
Shadow Path: site/src/@elegantstack/flow-ui-theme/theme/colors.js
Original Path: packages/flow-ui/flow-ui-layout/src/Footer/Footer.jsx
Shadow Path: site/src/@elegantstack/flow-ui-layout/Footer/Footer.jsx
Here are more examples of shadow paths for various components:
Powered By Gatsby Component:
packages/flow-ui/flow-ui-components/src/PoweredByGatsby/PoweredByGatsby.jsx
site/src/@elegantstack/flow-ui-components/PoweredByGatsby/PoweredByGatsby.jsx
Author Compact Widget:
packages/flow-ui/flow-ui-widgets/src/AuthorCompact/AuthorCompact.jsx
site/src/@elegantstack/flow-ui-widgets/AuthorCompact/AuthorCompact.jsx
Personal Theme Hero Content:
packages/themes/gatsby-theme-flexiblog-personal/src/components/Hero/Hero.Content.jsx
site/src/@elegantstack/gatsby-theme-flexiblog-personal/components/Hero/Hero.Content.jsx
Personal Theme Posts Page:
packages/themes/gatsby-theme-flexiblog-personal/src/containers/Posts.jsx
site/src/@elegantstack/gatsby-theme-flexiblog-personal/containers/Posts.jsx
If you want to dive deeper into Component Shadowing, you can read more about it on the Gatsby blog.
Your insights drive us! For any questions, feedback, or thoughts, feel free to connect:
If you found this guide beneficial, don’t hesitate to share it with your network. Until the next guide, happy coding!
Quick Links
Legal Stuff