Where to save global/site wide information?

Hi there,

I’m currently building a sort of web app using Kirby as a backend and I have a small dilemma. I’ve been wondering, where should I be saving common/site wide/global information that should be customizable?

From what I can gather, there’s 2 places where you usually save global info. site.txt and config.php. Which should be used and why?

For example where should global SEO information go? API keys? Contact information? Currency (USD, CAD, EUR, etc.)?

Is there already an established idea?

Thanks

This is what I’ve been doing:

  • User visible information or setting that needs to be maintained be a non-technical person are stored at site.txt: title, description, social links and so on…
  • API keys, Google Analytics code, email settings are stored in environment variables then used in config files
1 Like

I’d say anything that needs to be accessible/editable by panel users, should go into site.txt, the rest into config.php.

I think this is the criteria the makes the most sense to me. Thanks!

I also assume that sensitive information shouldn’t be found in site.txt since the content is readable by the browser.