This project has been based upon the structure generated by Discourse Theme CLI to hold all customization needed for the custom debtcollective community (all customisation that fits within the Theme scope).
If you want to know more about themes, themes component, widgets and other customization approaches for Discourse take a look at Beginner’s guide to using Discourse Themes.
Before you install discourse, you will need the following dependencies, so be sure you have them install before continue.
Using windows? Follow this guide.
If you want to run discourse locally with out customizations please follow the instructions from our discourse-import project.
Are the skins and overall design of the app. You can have one active at a time. They can have global settings to be managed by the admin.
More narrow focus this are packages focus to customise one aspect of the app.
Themes can only amend the front end and have no access to the backend.
You can install themes using a Github repository. After install a theme, you can add the theme components by going to the theme admin panel under the section of "theme components".
Structure of themes and theme components
yarn install
bundle install # install discourse theme cli
The overall information can be found at
Developer's guide to Discourse Themes
Beginners' guide to using Theme Creator and Theme CLI to start building a Discourse theme
There are three things you can do to widgets in Discourse themes.
- Modify them - like we did with controllers and components
- Decorate them - as in add elements before or after them
- Create them from scratch
Widgets have their own caveats, to get more context of Widget's limitations please read this.
Discourse uses Ember for client side development, we'd suggest you to read emberjs documentation and install the ember development tools
We can use your.site.com/safe-mode
in order to bypass the theme if things gets broken.
Due to limitations of discourse technology we choose to drive our code using crypress.io in order to make the test run you need to:
cp cypress.sample.json cypress.env.json
Create an API key for an admin user and fill the cypress.env.json
with the username and the api key as the template suggests
yarn run test:e2e:dev
This theme expect the community to have set Categories only as a homepage, you can achieve that by running setup wizard again visiting http://localhost:3000/wizard
(for local discourse)
The current efforts section in the Home Page pulls from the current-efforts
tag. This tag is only be avaiable for staff to use.
There are a few covenient plugins you may want to add if you are using VSCode.
those in order to make sure you have automatic fix over the code.
We also suggest to install Webhint
There is a complete guide to onboarding you within the Discourse customisation world at Developer’s guide to Discourse Themes