-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-theme-notes] showing improper breadcrumbs when basePath is set to default value. #15493
Comments
A PR to fix this would be great @jakewies! |
Awesome I’ll get on that later today after the day job! 🤓 |
@johno is there any way I can test local changes to supported themes? I see some docs on contributing to core/plugins/docs/etc., but nothing related to official themes. I can make my changes but would love to get some immediate feedback that they work. I guess I could do something like linking packages, but I’m curious if there is a supported way. First time contributor 🤓 I’ve read some contribution docs and does mention |
@jakewies there is, apologies on it not being documented yet! To run a given theme you can (from the root of the gatsby repo): cd themes
yarn
yarn workspace gatsby-starter-theme start For changes in
Welcome! 💜💜💜
The themes side of things is new so our contributing docs aren't quite there yet. I'll spend some time tomorrow formalizing theme development docs. Thanks for your patience! Let us know if you encounter any other issues, always happy to help. |
@johno unfortunately still having some issues during development. Let me outline the process I took:
I’m certain my code change works, as I’ve tested it in a local project that uses ——— EDIT: Also, tried wiping cache in the ——— EDIT 2: I ran
I’m not too familiar with ——— EDIT 3: Here’s a snapshot of It’s obvious to me now why my code changes aren’t showing in the browser, because Why? I have no clue 😆 Obviously there is no symlinking going on. But I thought, with |
Hey @johno not sure if you’ve had a chance to peak at my findings in the last week. No rush as this isn’t a pressing issue. Would love to help get this merged. I just need some guidance when developing these official themes. 😄 |
Description
I’ve been playing around with
gatsby-theme-notes
and noticed a small issue related to breadcrumbs inside of subdirectories of thecontentPath
(i.e./content/notes
).Steps to reproduce
gatsby-theme-notes
:No custom configuration is needed, as the issue only appears under conditions where the user of
gatsby-theme-notes
has not provided a custombasePath
option.localhost:8000/example-dir
.Expected result
The breadcrumbs at the top of the page should look like this:
Actual result
The breadcrumbs at the top of the page look like this:
Environment
Debugging
I’ve spent a little bit of time debugging the issue, and I’ve traced it back to 2 separate parts of the same file:
In scenarios where
basePath
is the default value”/“
, the regex replacement in # 1 will render nothing. Then, in the component’s render method, the initial breadcrumb divider in # 2 is rendered.The initial breadcrumb divider should only render if there is a custom
basePath
(or more importantly, if thebasePath
has a text length).Unless this is the intended behavior, I can make a PR to fix. 😄
The text was updated successfully, but these errors were encountered: