Yep I believe you are doing it correctly, I have just tried the code on a fresh 3.1.x core code and got it to work.
Here is my code example + a few changes as to how I would have approached it. Let me know if you have any questions.
https://gist.github.com/camfindlay/af531b60502888b07529#file-customsiteconfig-php-L13
Posted to: Custom Site Config! | Show Thread | Post Reply