Gogs Configurator

I don’t like the way the config is presented in the documentation. Yes, it is well localized and all, but you can’t do anything with it. And at some places you still don’t get what an option really does.

So I figured it would be nice to have the settings definitions in a machine readable format like JSON to make more out of it. Yesterday I hacked a small example of what a generator for a gogs config could look like:


The settings defintions are located in js/settings.js and in my opinion it would be nice to use such a format to generate the documentation. I’m not into localisation, so I don’t know how it could be integrated in such JSON (well, a look-up dictionary I think ;)). Also, such a form which generates their configuration can be helpful for users.

Of course it is far from perfect:

  • the JSON format is not very well suited
  • I had to hack the json-forms.js
  • the UI is not very enhanced
  • the headers have got a label :smiley:
  • several dependencies could be included, like showing the logs.console section only if console is activated.
  • Import of INI is not supported
  • The INI export isn’t correct, especially special chars and arrays are incorrect

Still, it is a nice demonstrator and I want to know what you think :slight_smile: