Skip to content
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

Local graph blocked on Home node #247

Open
Shynif opened this issue Feb 15, 2024 · 0 comments
Open

Local graph blocked on Home node #247

Shynif opened this issue Feb 15, 2024 · 0 comments

Comments

@Shynif
Copy link

Shynif commented Feb 15, 2024

Local graph only shows the graph from the home node

Why

Netlify makes lowercase url but the graph.json containing the graph is case sensitive.
It can't find the url in the JSON so it goes on the Home node as a default backup value.

Fix

Quick and dirty fix (makes the current node graph case insensitive !!! Watchout for collisions)
Edit src/site/_includes/components/graphScript.njk
Add the following right after line 30

for (var key in remaining) {
    if (key.toLowerCase()==currentLink) {
        currentNode = remaining[key];
    }
}

I just post this here in case someone ran in that same problem. I don't think there is a universal magic trick to properly fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant