Code Monkey home page Code Monkey logo

Comments (7)

sbardian avatar sbardian commented on June 19, 2024

@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.

sbardian avatar sbardian commented on June 19, 2024

@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.

gp1234 avatar gp1234 commented on June 19, 2024

@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.

sbardian avatar sbardian commented on June 19, 2024

@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.

sbardian avatar sbardian commented on June 19, 2024

@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.

gp1234 avatar gp1234 commented on June 19, 2024

@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.

sbardian avatar sbardian commented on June 19, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.