-
Notifications
You must be signed in to change notification settings - Fork 985
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
Allow load_data
to take a literal
#1794
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can you remove the unrelated commits? |
Sure, I’ll rebase when I get home.
… On Mar 15, 2022, at 11:24 AM, Vincent Prouillet ***@***.***> wrote:
Can you remove the unrelated commits?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.
|
@Keats I fixed the commit history like you asked, so should be ready to review. Thanks. |
Keats
requested changes
Mar 17, 2022
* Add `literal` as a new entry for `data source`, to be used by the `load_data` function * Add tests to the module for plain text, json, xml, toml, and csv * Update error messaging to include literal as a potential choice * Update site documentation to include instructions for using `load_data` with a literal
Keats
approved these changes
Mar 21, 2022
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant discussion: https://zola.discourse.group/t/allow-load-data-to-take-a-literal/1165
I posted on the Zola discourse site but I don't think anyone responded. In any case, I've being using
POST
+ an "echo server" to essentially do the same thing, which is kind of less than ideal. The change was relatively easy to make, so I just did it.Basically, I just think this is relatively harmless and would make Zola a tiny bit more flexible and easy to use. It could be something as simple as prototyping and not wanting to have to load from an actual file, or there could be something very complicated that you're doing perhaps, for example maybe you need to deviate from something that's stored in a file, like it's beyond your control, but you still need it in object format.
In any case, I ran into some circumstances that weren't pleasant to deal with without it, and my best solution was the echo server I mentioned above, which isn't super fun to use.
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one: