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

How to add values using Generators at build time #3661

Closed
yoshyosh opened this issue Apr 17, 2015 · 2 comments
Closed

How to add values using Generators at build time #3661

yoshyosh opened this issue Apr 17, 2015 · 2 comments

Comments

@yoshyosh
Copy link
Contributor

Having trouble understanding the documentation. I'm trying to add variables that I create in my generator into specific blog posts. Is there a way to parse a blog post to retrieve something like a url, then use that url (to ping an api for example) in the generator to return another value that is then added to that blog post?

@parkr
Copy link
Member

parkr commented Apr 17, 2015

The generators are called after the read step so you should be able to look through site.posts and do whatever you need in your generator's generate method. To add variables, add them to the post.data hash!

@parkr parkr closed this as completed Apr 17, 2015
@yoshyosh
Copy link
Contributor Author

Great thank you!

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants