aravindballa / gatsby-theme-andy

A Gatsby theme to build Andy style websites. 📑
343 stars 46 forks source link

Help: Gatsby theme brain fails if any folder within the content folder #5

Closed thisizkp closed 4 years ago

thisizkp commented 4 years ago

Hi, @aravindballa thanks for the amazing project.

I'm using Obsidian as my note-taking tool to capture those ideas locally. The way I've set up Obsidian is to read everything from the content folder so that I can see those graphs and connections.

Obsidian generates a .obsidian directory for config related things. Even though it's a hidden directory, I think gatsby-theme-brain is trying to generate queries from the hidden directory. Because it's a directory and not a file, it's throwing an error saying that it is an illegal operation.

I'm not sure if gatsby-theme-andy has any other config where could change/modify things a bit or if we should raise this issue in gatsby-theme-brain or gatsby.

I have noticed that notes.aravindballa.com uses obsidian too. As there is a mention of that in the .gitignore.

For now, when I'm doing any development... I'm deleting the config directory when I'm writing I'm putting in back. But it can become a boring chore too. I'm curious if others having any similar issues or found any ways to solve it. So posting it here in this repo.

aravindballa commented 4 years ago

Updating to the latest version of gatsby-theme-brain fixes this as well. You can upgrade the latest version of this theme v0.1.4 and have files other than markdown (.obsidian in our case).

Closing this.

thisizkp commented 4 years ago

@aravindballa even after updating the deps, I'm facing an issue with the build.

"@aengusm/gatsby-theme-brain" threw an error while running the sourceNodes lifecycle:
10:11:30 AM: content.matchAll(...) is not a function or its return value is not iterable

any idea what's the issue is with?

aravindballa commented 4 years ago

Can you help me reproduce this? I use Obsidian too, so I have .obsidian in ./content.

thisizkp commented 4 years ago

Found the solution. It is happening because of the recent upgrade of gatsby-theme-brain.

It requires Node v12 for gatsby-theme-brain to work

I think we should mention the same in this project ReadMe too so that users will not face the above issue. :)

aravindballa commented 4 years ago

Ah yes. Will add that. Thanks :)