# Developers

**URL:** https://meta.discourse.org/c/wiki/developers/179.md

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

---

## [Developer Index](https://meta.discourse.org/t/developer-index/322723)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 0\
**Last updated:** [August 21, 2024, 2:15pm UTC](https://meta.discourse.org/t/developer-index/322723 "2024-08-21T14:15:43Z")

</div>

Discourse dev environment setup: (outdated) Guide to Setting Up Discourse Development Environment - GitHub Codespace NSFW content blurring: Our solution for blurring NSFW content Language-specific code blocks: Setup Cod…

---

## [Common list of imports for Theme Components/plugins (JS)](https://meta.discourse.org/t/common-list-of-imports-for-theme-components-plugins-js/382493)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Replies:** 1\
**Last updated:** [December 26, 2025, 12:19pm UTC](https://meta.discourse.org/t/common-list-of-imports-for-theme-components-plugins-js/382493 "2025-12-26T12:19:50Z")

</div>

I usually find myself digging around to get imports for different things when I make a Theme Component, so I decided to compile a bunch of them and put them here. Ember-related Name Import Usage Component import…

---

## [Customizing subcategory boxes in Discourse](https://meta.discourse.org/t/customizing-subcategory-boxes-in-discourse/239691)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 2\
**Last updated:** [April 2, 2026, 9:45pm UTC](https://meta.discourse.org/t/customizing-subcategory-boxes-in-discourse/239691 "2026-04-02T21:45:10Z")

</div>

:bookmark: This guide explains how to customize the appearance of subcategory boxes in Discourse, including adjusting styles for featured topics, modifying the “Boxes” style, and managing category description truncation…

---

## [Setup a ToolTip in your Forum](https://meta.discourse.org/t/setup-a-tooltip-in-your-forum/45792)

<div class="topic-metadata">

**Author:** [@marcospreviato](https://meta.discourse.org/u/marcospreviato)\
**Replies:** 4\
**Last updated:** [January 12, 2026, 4:59pm UTC](https://meta.discourse.org/t/setup-a-tooltip-in-your-forum/45792 "2026-01-12T16:59:30Z")

</div>

Hi, this is my first post sharing a resource to help this wonderful community. I want to help them create simple forms a tooltip for your forum making it modern and clean, ok lets do it! First what is tooltip? A toolti…

---

## [Override existing Discourse methods in plugins](https://meta.discourse.org/t/override-existing-discourse-methods-in-plugins/83389)

<div class="topic-metadata">

**Author:** [@gdpelican](https://meta.discourse.org/u/gdpelican)\
**Replies:** 8\
**Last updated:** [December 10, 2025, 5:36pm UTC](https://meta.discourse.org/t/override-existing-discourse-methods-in-plugins/83389 "2025-12-10T17:36:56Z")

</div>

I’ve been running into a bunch of instances recently of needing to override existing ruby methods from plugins, and thought I’d share my best practices here. Overriding an instance method class ::TopicQuery module Bab…

---

## [User custom fields validation implementation](https://meta.discourse.org/t/user-custom-fields-validation-implementation/388179)

<div class="topic-metadata">

**Author:** [@Yan\_Rudenko](https://meta.discourse.org/u/Yan_Rudenko)\
**Replies:** 0\
**Last updated:** [November 11, 2025, 8:10pm UTC](https://meta.discourse.org/t/user-custom-fields-validation-implementation/388179 "2025-11-11T20:10:06Z")

</div>

This is an article for future DEVs that might need this for creating custom Plugin specifically for validation User custom fields. Written while having Discourse version 3.6.0.beta3-latest (current commit a7326abf15), s…

---

## [Customize the New Topic button](https://meta.discourse.org/t/customize-the-new-topic-button/197848)

<div class="topic-metadata">

**Author:** [@Don](https://meta.discourse.org/u/Don)\
**Replies:** 11\
**Last updated:** [June 10, 2025, 10:58pm UTC](https://meta.discourse.org/t/customize-the-new-topic-button/197848 "2025-06-10T22:58:15Z")

</div>

Hello, I just want to share with you how I make our new topic button. Little CSS :slight\_smile: I use for this color variables. (tertiary, secondary and primary-medium) New Topic button Open Draft button #creat…

---

## [Working with .erb templates in a plugin](https://meta.discourse.org/t/working-with-erb-templates-in-a-plugin/345777)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**Replies:** 0\
**Last updated:** [January 6, 2025, 9:12am UTC](https://meta.discourse.org/t/working-with-erb-templates-in-a-plugin/345777 "2025-01-06T09:12:26Z")

</div>

I’ve been giving some advice on how to work with .erb templates in Discourse recently and noticed there isn’t much detail on this here on meta, so I thought I’d start this wiki on the subject. This wiki assumes you know …

---

## [Preloading data and dealing with N+1 Query problems](https://meta.discourse.org/t/preloading-data-and-dealing-with-n-1-query-problems/347688)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**Replies:** 0\
**Last updated:** [January 17, 2025, 2:41pm UTC](https://meta.discourse.org/t/preloading-data-and-dealing-with-n-1-query-problems/347688 "2025-01-17T14:41:19Z")

</div>

When working with the Discourse rails application, whether building a plugin, or making a pull request to discourse/discourse there are a number of contexts where you’ll encounter N+1 query problems. This topic explains …

---

## [(outdated) Guide to Setting Up Discourse Development Environment - GitHub Codespace](https://meta.discourse.org/t/outdated-guide-to-setting-up-discourse-development-environment-github-codespace/307231)

<div class="topic-metadata">

**Author:** [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Replies:** 8\
**Last updated:** [November 14, 2024, 12:20pm UTC](https://meta.discourse.org/t/outdated-guide-to-setting-up-discourse-development-environment-github-codespace/307231 "2024-11-14T12:20:09Z")

</div>

Developing Using GitHub Codespaces GitHub Codespace is a great development option. It’s great because it’s hosted in the cloud, I can easily ensure that everyone developing here has the same environment, no dealing wit…

---

## [Getting started using Postman with the Discourse API](https://meta.discourse.org/t/getting-started-using-postman-with-the-discourse-api/333669)

<div class="topic-metadata">

**Author:** [@supermathie](https://meta.discourse.org/u/supermathie)\
**Replies:** 0\
**Last updated:** [October 30, 2024, 5:49pm UTC](https://meta.discourse.org/t/getting-started-using-postman-with-the-discourse-api/333669 "2024-10-30T17:49:40Z")

</div>

Summary Postman is a way to easily construct and test requests against an API. Configuring with Discourse After opening Postman, click Create Workspace: Choose Blank workspace and click Next. Title it Disco…

---

## [Add a custom per-user setting in a plugin](https://meta.discourse.org/t/add-a-custom-per-user-setting-in-a-plugin/94048)

<div class="topic-metadata">

**Author:** [@gdpelican](https://meta.discourse.org/u/gdpelican)\
**Replies:** 27\
**Last updated:** [December 20, 2023, 6:49pm UTC](https://meta.discourse.org/t/add-a-custom-per-user-setting-in-a-plugin/94048 "2023-12-20T18:49:07Z")

</div>

I just went through this process and experienced a bunch of trial and error, so I thought I’d document my findings to help the next developer to come along. The things I needed: Register your custom field type (mine …

---

## [Automating Discourse Plugin Setup with \`create-discourse-plugin\` gem](https://meta.discourse.org/t/automating-discourse-plugin-setup-with-create-discourse-plugin-gem/315013)

<div class="topic-metadata">

**Author:** [@gabriel](https://meta.discourse.org/u/gabriel)\
**Replies:** 7\
**Last updated:** [August 27, 2024, 6:26pm UTC](https://meta.discourse.org/t/automating-discourse-plugin-setup-with-create-discourse-plugin-gem/315013 "2024-08-27T18:26:52Z")

</div>

:mega: This plugin is now bundled with Discourse core. There is no need to use this gem. To create a new plugin, use: rake plugin:create\[plugin-name\] Since I started developing discourse plugins, I felt the overall…

---

## [Customize mention colors](https://meta.discourse.org/t/customize-mention-colors/219023)

<div class="topic-metadata">

**Author:** [@Alexander](https://meta.discourse.org/u/Alexander)\
**Replies:** 3\
**Last updated:** [December 13, 2023, 5:04pm UTC](https://meta.discourse.org/t/customize-mention-colors/219023 "2023-12-13T17:04:32Z")

</div>

Inspired by this topic, and the custom colors of Discord roles, I have written this very simple code that adds a data-mention to the mentions of groups and users, in this way to be able to place different colors (And not…

---

## [Learn how to start building stuff for Discourse if you're newbie (like myself)](https://meta.discourse.org/t/learn-how-to-start-building-stuff-for-discourse-if-youre-newbie-like-myself/45954)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**Replies:** 14\
**Last updated:** [October 15, 2023, 8:19pm UTC](https://meta.discourse.org/t/learn-how-to-start-building-stuff-for-discourse-if-youre-newbie-like-myself/45954 "2023-10-15T20:19:53Z")

</div>

There are a few ‘how to start’ guides for working with Discourse already and a wealth of useful info on meta, but I thought it might help to give an insight to the mental processes of starting from little, if any, prior …

---

## [Installing the Discourse development environment on Ubuntu](https://meta.discourse.org/t/installing-the-discourse-development-environment-on-ubuntu-ubuntu-discourse/248481)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**Replies:** 5\
**Last updated:** [October 13, 2023, 6:20am UTC](https://meta.discourse.org/t/installing-the-discourse-development-environment-on-ubuntu-ubuntu-discourse/248481 "2023-10-13T06:20:08Z")

</div>

\<div\>\</div\> :warning: This guide is only for configuring the Discourse development environment. If you need to install Discourse in a production environment, please refer to the content on the page: Install Discourse i…

---

## [Package a Discourse plugin as a gem](https://meta.discourse.org/t/package-a-discourse-plugin-as-a-gem/273036)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**Replies:** 4\
**Last updated:** [July 27, 2023, 4:59pm UTC](https://meta.discourse.org/t/package-a-discourse-plugin-as-a-gem/273036 "2023-07-27T16:59:01Z")

</div>

Pavilion has started to package some Discourse plugins as ruby gems, starting with our subscription client. Our subscription client is still a separate plugin which now loads this gem, but it’s backend is now entirely…

---

## [Insertable, centrally maintained text/markdown snippets](https://meta.discourse.org/t/insertable-centrally-maintained-text-markdown-snippets/97246)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**Replies:** 9\
**Last updated:** [July 23, 2023, 5:28am UTC](https://meta.discourse.org/t/insertable-centrally-maintained-text-markdown-snippets/97246 "2023-07-23T05:28:29Z")

</div>

I was wondering if there was any way I could define a string of text in a single place and insert it within posts with a single, short reference. It’s a bit like the out of the box Admin -\> Customize -\> Text Content, bu…

---

## [Set up a smart chatbot on discourse 🤖](https://meta.discourse.org/t/set-up-a-smart-chatbot-on-discourse/82632)

<div class="topic-metadata">

**Author:** [@Timothy\_Vail](https://meta.discourse.org/u/Timothy_Vail)\
**Replies:** 14\
**Last updated:** [February 9, 2023, 12:52am UTC](https://meta.discourse.org/t/set-up-a-smart-chatbot-on-discourse/82632 "2023-02-09T00:52:36Z")

</div>

Hello, After weeks of tinkering, I finally managed to set up an AI bot, similar to discobot but one that learns and is more responsive. Here is how I did it for anyone interested in setting it up. There is quite a few…

---

## [Add copyright protection to tagged topics](https://meta.discourse.org/t/add-copyright-protection-to-tagged-topics/208970)

<div class="topic-metadata">

**Author:** [@Don](https://meta.discourse.org/u/Don)\
**Replies:** 14\
**Last updated:** [December 17, 2022, 2:46pm UTC](https://meta.discourse.org/t/add-copyright-protection-to-tagged-topics/208970 "2022-12-17T14:46:39Z")

</div>

Hello, Many of our Member have quality topics, blog articles etc… Unfortunately others steal these (and make it public other sites as their own without any source) even if the author says clearly. “I only write it to th…

---

## [Custom Discourse Reactions](https://meta.discourse.org/t/custom-discourse-reactions/198043)

<div class="topic-metadata">

**Author:** [@Don](https://meta.discourse.org/u/Don)\
**Replies:** 13\
**Last updated:** [May 29, 2022, 3:40pm UTC](https://meta.discourse.org/t/custom-discourse-reactions/198043 "2022-05-29T15:40:23Z")

</div>

Hello, I made some CSS modification on Discourse Reactions Plugin. So it looks much like Facebook reaction buttons. These for 6 reaction buttons including the default which is on my site is :heart: . COMMON / SCSS Pl…

---

## [Setup Code blocks that stand out, per-language backgrounds](https://meta.discourse.org/t/setup-code-blocks-that-stand-out-per-language-backgrounds/57255)

<div class="topic-metadata">

**Author:** [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)\
**Replies:** 2\
**Last updated:** [October 17, 2017, 2:10pm UTC](https://meta.discourse.org/t/setup-code-blocks-that-stand-out-per-language-backgrounds/57255 "2017-10-17T14:10:29Z")

</div>

Here’s a really quick and easy CSS change that may benefit forums where people post code in a few different languages. At least with the languages we use, Discourse does a great job of guessing which language code is in…

---

## [Create a custom badge with an image through the API](https://meta.discourse.org/t/create-a-custom-badge-with-an-image-through-the-api/210616)

<div class="topic-metadata">

**Author:** [@mattdm](https://meta.discourse.org/u/mattdm)\
**Replies:** 2\
**Last updated:** [December 5, 2021, 7:41pm UTC](https://meta.discourse.org/t/create-a-custom-badge-with-an-image-through-the-api/210616 "2021-12-05T19:41:55Z")

</div>

Sure, the included badges are … nice. Nothing wrong with them at all. But, what if you want more? What if you want to go beyond the pre-defined symbol set? Sure, there’s an admin page where you can upload them. But what …

---

## [Redirect an existing route in a theme component](https://meta.discourse.org/t/redirect-an-existing-route-in-a-theme-component/201900)

<div class="topic-metadata">

**Author:** [@JonathanShaw](https://meta.discourse.org/u/JonathanShaw)\
**Replies:** 0\
**Last updated:** [August 27, 2021, 12:33pm UTC](https://meta.discourse.org/t/redirect-an-existing-route-in-a-theme-component/201900 "2021-08-27T12:33:37Z")

</div>

To redirect an existing Discourse route in a theme component, you can use api.modifyClass to modify the route class. More information can be found in the Ember documentation on routing redirection. Here’s an example: \<s…

---

## [Customize the loading icon](https://meta.discourse.org/t/customize-the-loading-icon/165743)

<div class="topic-metadata">

**Author:** [@Canapin](https://meta.discourse.org/u/Canapin)\
**Replies:** 7\
**Last updated:** [June 16, 2021, 6:12pm UTC](https://meta.discourse.org/t/customize-the-loading-icon/165743 "2021-06-16T18:12:06Z")

</div>

Customize the loading icon Note that it changes the main loading icon, but not the small loading icon (composer, search menu, etc). Edit your current theme or create a new theme component. Go in \</head\> and paste t…

---

## [Our solution for blurring NSFW content](https://meta.discourse.org/t/our-solution-for-blurring-nsfw-content/124584)

<div class="topic-metadata">

**Author:** [@bartv](https://meta.discourse.org/u/bartv)\
**Replies:** 9\
**Last updated:** [November 14, 2020, 10:56pm UTC](https://meta.discourse.org/t/our-solution-for-blurring-nsfw-content/124584 "2020-11-14T22:56:30Z")

</div>

At the Blender Artists forum we have a faily liberal content policy where we allow nudity and violence (up to a point). While most members are fine with this kind of content, there are of course audiences and situations …

---

## [Use Node-Red and Telegram to Monitor Discourse Status](https://meta.discourse.org/t/use-node-red-and-telegram-to-monitor-discourse-status/157229)

<div class="topic-metadata">

**Author:** [@neounix](https://meta.discourse.org/u/neounix)\
**Replies:** 0\
**Last updated:** [July 9, 2020, 7:17am UTC](https://meta.discourse.org/t/use-node-red-and-telegram-to-monitor-discourse-status/157229 "2020-07-09T07:17:02Z")

</div>

Please note that this is a different application than sending Discourse application notifications using the Discourse Telegram Notifications plugin. This NR application is for monitoring the server, Docker and the Dis…

---

## [Use Ember.PromiseProxyMixin in a theme](https://meta.discourse.org/t/use-ember-promiseproxymixin-in-a-theme/147231)

<div class="topic-metadata">

**Author:** [@zcuric](https://meta.discourse.org/u/zcuric)\
**Replies:** 1\
**Last updated:** [April 8, 2020, 10:01am UTC](https://meta.discourse.org/t/use-ember-promiseproxymixin-in-a-theme/147231 "2020-04-08T10:01:08Z")

</div>

Recently the Ember.PromiseProxyMixin was added to ember modules in the discourse core. https://github.com/discourse/discourse/pull/9312 It’s very useful Ember mixin which allows you to make async requests and to work e…

---

## [Use the API to create restricted categories for external groups](https://meta.discourse.org/t/use-the-api-to-create-restricted-categories-for-external-groups/139107)

<div class="topic-metadata">

**Author:** [@Judith](https://meta.discourse.org/u/Judith)\
**Replies:** 0\
**Last updated:** [January 19, 2020, 6:31pm UTC](https://meta.discourse.org/t/use-the-api-to-create-restricted-categories-for-external-groups/139107 "2020-01-19T18:31:12Z")

</div>

If you have a community site that also (but not exclusively) uses Discourse, you may want to provide a restricted subforum for each of your groups, for example as a workspace. Here’s how, in Ruby: Ensure that your API…

---

## [Display star ratings for Discourse pages in search engine results (SERPs)](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316)

<div class="topic-metadata">

**Author:** [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)\
**Replies:** 13\
**Last updated:** [April 26, 2019, 10:31am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316 "2019-04-26T10:31:01Z")

</div>

Displaying star rating with Discourse is easy. I am happy to share, It can be done in simple few steps Process Setup Google Tag Manager for your Discourse Application Add a new HTML Tag containing JSON-LD marku…

[Next page](https://meta.discourse.org/c/wiki/developers/179.md?page=1)
