Get raw content from Github Gist to a variable


I’m having what might seem like a simple issue but there must be something which I’m overseeing and for the life of me I can’t figure out how to search for the right guidance.

What I’m trying to do is simply get the raw text which can be found in a github gist and store it in a variable in hugo. The gist contains only one number, that’s it.

Say this is the gist:

That number gets updated externally, and I want to be able to convert that number to what would look like a progress bar on my website. I don’t want to display the gist as an embedded text, I just need to store that number somehow and then use it in the website. I need to mention that this number changes multiple times a day so this should be reflected on page refresh.

If you need any additional clarification or info or if I’m thinking about this the wrong way please let me know, I’m open to suggestions and feedback.


Hugo is a static site generator. If you want the value to update when you refresh your browser, use JavaScript.

Thank you! I understand what Hugo does and how it generates the site. I do however have my website all in done with Hugo already, changing to a different platform at this point would not be a viable solution for me unfortunately. Would there be ways to integrate any Js with Hugo, or would there be ways to have a workaround in order to implement something like this? Could you be more specific please in what direction of Js I should look into? I’m genuinely trying to figure out what my best course of action is with what I have on hand now.

I’m not suggesting this.


I suggest you raise your question on Stack Overflow or similar.