Comments (7)
@gp1234 the default is the page name for the crumb. If you would like to change it try using the crumbLabel
prop. Let me know if this works out. See a list of props here.
from gatsby-plugin-breadcrumb.
@gp1234 read your issue again. . . Do you have a codesandbox I could take a look at, maybe I didn't understand it completely with my first reply.
from gatsby-plugin-breadcrumb.
@sbardian thank you for answering me, I will do a codesandbox right now, in the meantime maybe I could explain myself better, I am using the crumLabel prop in each page where I use the breadcrumb component even though when I visit this page the crumLabel prop is taken when I continue down the herarchy they loose the crumbLabel I have define and take the url path.
from gatsby-plugin-breadcrumb.
@gp1234 ah, I think I know what is going on here. See the following for the gatsby-config.js
options here. I have to do this in my Books app also. I have a Breadcrumb structure like ( Home / Books / Eye of the World ). Where "Books" is my path like yours. Try using the gatsby-config.js
option as follows for those path updates when not on the specific paths.
// crumbLabelUpdates: optional, update specific crumbLabels in the path
crumbLabelUpdates: [
{
pathname: '/book',
crumbLabel: 'Books'
}
]
This takes an array of objects, one for each path option you would like to provide a crumb label for. Let me know!
from gatsby-plugin-breadcrumb.
@gp1234 This isn't documented very well, if you do a codesandbox I can show you how to use this option and confirm this is what is going on. Thanks!
from gatsby-plugin-breadcrumb.
@sbardian Thank you! yes this is the way to do it. I was able to implement it in my project. It will be really cool if this was done automatically though. Have a nice day and thank you again!
from gatsby-plugin-breadcrumb.
@gp1234 I'll look into this again to see if there is an option for that. Sadly when the breadcrumbs are auto generated (at build time) it doesn't have the props being sent via the <Breadcrumb/>
component. Happy to hear it works for you! I'm going to close this out, feel free to reopen, or open a new issue if needed. Thanks!
from gatsby-plugin-breadcrumb.
Related Issues (20)
- Unclear styling option rtfm HOT 6
- Allow use of wildcards/regex in "exclude" configuration option HOT 2
- Breadcrumb texts get confused with rerender HOT 5
- Action Required: Fix Renovate Configuration HOT 1
- TypeScript support HOT 4
- Support for gatsby v3 HOT 2
- Plugin gatsby-plugin-breadcrumb is not compatible with your gatsby version 3.1.0 - It requires [email protected] HOT 1
- Problems with `pathPrefix` HOT 4
- Plugin gatsby-plugin-breadcrumb is not compatible with your gatsby version 2.32.9 - It requires gatsby@^3.0.0 HOT 3
- I am having this unexpected behavior as well and the demo seems to be having the same issue HOT 8
- Dependency Dashboard
- warning Plugin gatsby-plugin-breadcrumb is not compatible with your gatsby version 4.2.0 - It requires gatsby@^3.0.0 HOT 9
- possibility of resetting the first path if it is changed HOT 4
- Plugin gatsby-plugin-breadcrumb is not compatible with your gatsby version 5.5.0 - It requires gatsby@^3.0.0 || ^4.0.0 HOT 5
- Unit Test failed with: TypeError: Cannot read properties of undefined (reading 'pathname') HOT 10
- Gatsby v5 support HOT 2
- Test action
- Test greeting
- Possibility of Automatically Generated crumbLabelUpdates HOT 14
- build failed HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-plugin-breadcrumb.