Comments (13)
I see it now! Yes this is not the expected behavior. I will look into this today!
from gatsby-plugin-breadcrumb.
I made a fork of your sandbox (https://codesandbox.io/s/pedro-martins-313ju). Seems there were a couple issues. One was most likely my fault. In the gatsby.config.js you had the same mistake I made updating my sandbox example to use a default crumb.
Double nested options
properties.
{
resolve: `gatsby-plugin-breadcrumb`,
options: { // no need for one of these. . . doh! my bad
options: {
defaultCrumb: {
location: {
state: { crumbClicked: false },
pathname: "/",
},
crumbLabel: "Home",
crumbSeparator: " / ",
},
},
},
},
The second change I made was how you were using the Breadcrumb component in /components/BackgroundComponent.js lines 24-32. No need to assign this to an array here /etc. Take a look at my fork and let me know what you think and if it is working as you expect. Also, if the docs could be more clear let me know or feel free to submit a PR, either way is great!
from gatsby-plugin-breadcrumb.
hey @dvlprmartins
I have updated the demo to use a default breadcrumb (https://codesandbox.io/s/50o4zwm91l). For your first issue it seems to work for me. Have a sandbox or something you could share? Only thing I can think of is it might be something wrong with the way the default crumb was structured in your gatsby-config.js
?
The second issue seems to work in the demo as well. So either I have a bug that isn't showing itself in the demo, a sandbox would be helpful on tracking this down, or there maybe something wrong in your default crumb structure?
Thanks!
from gatsby-plugin-breadcrumb.
Hello @sbardian
Thanks for your reply. I'll make a sandbox so I can share with you after I get off of work.
But yes It might be something wrong with my configuration, I'm also getting a navigation warning whenever I use a breadcrumb link.
I'll update this when I create the sandbox.
Thank you very much!
from gatsby-plugin-breadcrumb.
@sbardian I probably didn't explain my self very well.
I was able to reproduce my problem on the demo you provided.
If you go to Page 2 and refresh the page the breadcrumb will start on the Page 2.
If you go to the home page it will change to Page 2/Home
.
Isn't it possible to always keep the same structure Home -> Page 2 or Page 3, no matter where you reloaded your website?
from gatsby-plugin-breadcrumb.
@sbardian Awesome! Thanks for that!
If you need anything let me know!
from gatsby-plugin-breadcrumb.
@dvlprmartins actually. It may have just been that the sandbox didn't have the latest version of gatsby-plugin-breadcrumb
installed. I have updated it and I think it is behaving as it should now/as expected?
https://codesandbox.io/s/50o4zwm91l
Let me know, are you on the latest release?
from gatsby-plugin-breadcrumb.
@sbardian Yes I'm on the latest release and It's still happening.
Already tried using the component on every single page that I have and tried the layout method, the behaviour is the same.
from gatsby-plugin-breadcrumb.
Hmm. We'll check out the demo, is it working as you expect now? Otherwise maybe share the sandbox and I'll dig deeper. Thanks
from gatsby-plugin-breadcrumb.
Here is the demo that i think is working how we would expect. I had an error, but seems correct now.
https://codesandbox.io/s/50o4zwm91l
from gatsby-plugin-breadcrumb.
Here is the demo that i think is working how we would expect. I had an error, but seems correct now.
Indeed that demo works as expected!
Here's my sandbox https://codesandbox.io/s/github/dvlprmartins/dvlprmartins
Thanks for your help btw!
from gatsby-plugin-breadcrumb.
Thanks. I will dig into this tonight!
from gatsby-plugin-breadcrumb.
@sbardian Sorry for late reply.
Seems like the problem was actually the double nested properties haha :p
Thank you very much! I actually never noticed those.
Also fixed the array assignment, silly thing from me.
Thanks again.
I think the docs are clear. But anything that I feel that needs to be more clear I'll definitely make a PR. Want to start contributing to this community.
Again 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
- The paths don't have trailing slashes HOT 7
- Question about exclude pages in AutoGen HOT 3
- 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.