BlockPress now supports local configuration
New Features
Support for a local config file
I changed the initialisation such that before loading the default config.json, BlockPress will now first try to load local_config.json. The default page now instructs the new BlockPress user to create this file, and provide a link to the documentation and tutorials in the BlockPress wiki.
To test this we can create a local_config.json file in the web root directory, like this...

Reloading the site then produces the following...

The key change to the code involved the following code snippet...
// JQuery ready function that is called once document has loaded.
$(document).ready(function() {
    // Get local config
    $.ajax("local_config.json").done(parseConfig).fail(function(){
        // Else load default config on failure
        $.ajax("config.json").done(parseConfig).fail(configFail);
    });
});
As you can see, loading the default config is now a fail function of loading the local config.
Error message to display when local and default config files can't be found.
I also updated the config fail function to display a more friendly error message should the site fail, for any reason, to load either the default or local config files. This was done by adding a small hard coded config object into the fail function and instructing BlockPress to parse it in the normal way. I added a file with some error content to display as the main loaded content in such a scenario.
Commits
Try for yourself?
BlockPress is currently in alpha, but we are nearing the initial beta release. If you want to download the code and install it on your own webserver, feel free to clone directly from our github repository. Once the first beta is released, it will also be available as zip and tar.gz downloads.
Posted on Utopian.io - Rewarding Open Source Contributors


Thank you for the contribution. It has been approved.
Good job on a local config, that's another step toward mass adoption, (or at least more usage).
You can contact us on Discord.
[utopian-moderator]
Yes. Mass adoption will probably require at least a form driven config editor, which will probably require an optional editing interface written in a backend programming language, such as php or node.js. Since the config is json this should be simple enough, and maybe even something third party programmers can provide, if I don't get around to it first.
Hey @antonchanning I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
@antonchanning, Approve is not my ability, but I can upvote you.
Thanks. :)