Variables: Can they be defined by users?

I’m documenting some API use cases. Many of our REST calls include options like an “API Token”

My hope: find a way to use Hugo to set up variables.

Ideally, a reader would enter a value for an API_Token, and Hugo would populate that same value to all REST calls with that variable.

I’ve looked through what I could with User-Defined variables, and I think "no, that doesn’t help.


In your site configuration you can do something like:

api_token = 'abc123'

And access that value in your templates with:

{{ site.Params.api_token }}


Are you looking to use environment variables, or does what jmooring suggested do what you need?