-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add new flag to Google Sheets processor to treat content as a key/value store #222
Comments
Any particular thoughts on how localization overrides might work with something like this? |
As part of the preprocessor config we could add a These are the new config options I added in the previous commits:
And we could add |
Just to make sure I understand, so you'd have the first, default sheet with something like:
And in another sheet for a particular locale, you'd have something like:
If I specify something like:
Would it automatically output the data into a separate yaml file with the overrides? Is that the idea? |
Oh, I guess it would be in a separate front matter. So in that example, the yaml would be outputted as:
Is that right? |
It would require two preprocessors (one for each worksheet). If the preprocessors were configured to save to the same file, and if
Ultimately we could add a new way of specifying data sources directly in the YAML files but that's a bigger change that would require some good thought. For now the preprocessors build on what we already have and it would work well. |
SGTM |
I noticed that this also really benefits from the |
Implemented and documented at https://grow.io/docs/preprocessors/#google-sheets I'm going to close this issue now, and I don't think we should support any special behavior for multi-part localized documents with this preprocessor. Instead, if you would like to bring in localized content from a Google Sheet, I think it should be done using the multi-file localization feature that was implemented in #229. An example configuration for that:
|
To make it easier to map content from a Google Sheet to a page's structure, allow the developer to indicate that the Google Sheet should be processed as a key/value store instead of a list of rows.
For example, given the following Google Sheet:
WITH the new flag:
WITHOUT the new flag:
We'd want similar behavior to the SO answer here: http://stackoverflow.com/a/16641671/916643
The text was updated successfully, but these errors were encountered: