Giter VIP home page Giter VIP logo

discourse-settings-uploader's Introduction

discourse-settings-uploader

Install a Discourse settings JSON file to a site

To create/retrieve settings

Create a JSON settings dump by visiting https://discourse.example.com/admin/site_settings.json and saving the file somewhere convenient.

Retrieve your site's API key from https://discourse.example.com/admin/api/keys

To install these settings to another site

Do this:

./discourse-settings-uploader HOSTURL API_KEY API_USER SETTINGS_FILE

For example:

./discourse-settings-uploader https://discourse.example.com d35989078a system site_settings.json

Warning

This script does no error checking and could destroy your site, cause fires, or hurt people.

You should make a backup of your site before you use this script.

You can, at your own peril, edit the JSON file before running the script, but note that no error checking is done, so you should make a backup of the original settings file too.

Making your Downloaded JSON File readable

You can pretty-print your downloaded JSON file like this

jq . site_settings.json > pretty_settings.json

If you need to install it in Ubuntu, you can do this:

apt-get install jq

See this site for instructions for installing it on other operating systems.

Caveat

The script uploads only settings that are different than the default value. This means that if there's some setting that's changed on the site you've uploaded that you want to restore to default with the script it won't work. The solution is to edit the JSON file so that the default value there doesn't match the value you want to set.

discourse-settings-uploader's People

Contributors

pfaffman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.