We tend to create themes from within Discourse, editing them in the customize - themes section of the admin section of a forum, and converting them to a repository when we’re done.
To make the last part of this task a bit more easy, I made a small tool that takes a
.dcstyle.json export and converts it to a repository with an
about.json file and the
desktop directories with HTML and CSS files.
The tool can be found here GitHub - discoursehosting/dcstyle-to-theme-repo
It can be run from the command line and takes one or two arguments.
The first argument is the name of the exported
.dcstyle.json file. It will be converted to a theme with the same name (so
example.dcstyle.json will create a directory called
The second argument is the URL of your forum. It will be used to download and store any assets your theme may contain. This argument is mandatory if your theme includes any uploaded files.
Usage: dcstyle-to-repo.rb <dcstyle-file> [forum URL] dcstyle-file is a theme file exported from Discourse forum-URL (optional) is the forum URL that can be used to download assets