-
Notifications
You must be signed in to change notification settings - Fork 11
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
Enable running themes that have function gatsby-configs on their own #2
Comments
Right now the typography plugin requires that we pass in the site's root directory as an argument and functions don't pass the validation for a site's gatsby-config (only for a theme). This should work if the config for the theme is an object and not a function. Perhaps we should allow all gatsby-configs to be functions. Also we should have the typography plugin handle it's paths slightly differently to allow us to not need to pass through the root of the site as a config. |
In addition to updating the title, I'm considering a change to the ability to specify options that can be accessed in gatsby-config.js of a theme. The issue with using functions as gatsby-configs is that they aren't first-class so if you try to
This also presents an issue where if we add support for the function type config to gatsby, that we also have to add a way to pass the options in anyway. I'm trying to explore an alternative API where the config is exposed as an object at all times, but haven't hit on anything I like more yet. Open to ideas here. The idea in my head is roughly dotenv like, where you can define a file that applies to a theme's options. |
I'm probably not the right guy to ask for a clever API decision. To be honest I'm hardly understanding what I'm doing with my current theme 🙈
To later work easily on the theme (served via npm) it would be good to have the theme work standalone and not necessary the need being in a site-context. But that's only me. Because I use the theme already now in a couple little side-projects and I would love just to update everything in the theme. Right now I need |
sticking with the function approach, but that means we need to enable running themes on their own when they have function gatsby configs in core |
@ChristopherBiscardi
You could even |
When switching to the
themes/gatsby-theme-blog
folder and runyarn
andyarn develop
. I get an error. This would be helpful to work on the theme without having the site.Error
The text was updated successfully, but these errors were encountered: