Deploy version number variable

Hey! I’m wondering if there’s a way to pass the deploy id or build id into a Jekyll site variable similar to how Github pages have site.github.build_revision.

I want to create a method of hot-reloading a Jekyll site by essentially storing the variable site.netlify.build_revision in JS and periodically comparing it to a page on my site that would output the variable in JSON. If the saved and fetched variables are different, force a reload of the site.

Does anyone know if there’s something that is along these lines?

@connellmccarthy I’m not 100% sure if these are what you’re looking for, but Build metadata and Git metadata are available as environment variables:

That’s exactly what I’m looking for!

I used this gem: gem "jekyll-environment-variables" which allowed me to access it via {{ site.env.BUILD_ID }} and it worked perfectly.

Hi @connellmccarthy !

Thank you so much for reaching out and I appreciate you confirming your found your solution!.