Best way to access ENV vars in middleman4

Is there an update on the best practice for accessing environmental vars in middleman 4?

You can simply use the middleman-dotenv gem

Gemfile

gem 'middleman-dotenv'

config.rb

activate :dotenv
puts ENV['VARIABLE_NAME']