Documentation about extending Discourse with plugins, themes, and theme components, working with the core code, and using the Discourse API.
Using the Discourse API
- API documentation: Discourse REST API Documentation
- API examples: Discourse REST API comprehensive examples
- Reverse engineer the API: Reverse engineer the Discourse API
- Data Explorer queries: Run Data Explorer queries with the Discourse API
- API notifications: Get notifications via the API
- Fetch all posts: Fetch All Posts from a Topic Using the API
- Suspend user: Suspend a user via the API
- Create restricted categories: Use the API to create restricted categories for external groups
- Create custom badge: Create a custom badge with an image through the API
- Grant custom badge: Grant a custom badge through the API
- Ruby gem: Use the Discourse API ruby gem
- User API keys: User API keys specification
- Generate API keys: Generate User API Keys for testing
See also: https://docs.discourse.org/
Development Environments
- Docker setup: Install Discourse for development using Docker
- macOS setup: Install Discourse on macOS for development
- Ubuntu/Debian setup: Install Discourse on Ubuntu or Debian for Development
- Windows 10 setup: Install Discourse on Windows 10 for development
- GitHub Codespace: Guide to Setting Up Discourse Development Environment - GitHub Codespace
- Non-Docker plugins: Install plugins in your non-Docker development environment
- Local setup: Set up a local Discourse Development Environment?
- Multisite setup: Set up a multisite development environment
- Fedora setup: Set up Discourse for development on Fedora Linux
- Screen setup: Use Screen To Bootstrap A Development Install (Ubuntu)
Code & Internals
- Ember components: Add Ember Components to Discourse
- Lint and format: Automatically lint and format code before commits
- Acceptance tests: Write acceptance tests and component tests for Ember code in Discourse
- Run test suites: How to run Discourse core, plugin and theme QUnit test suites
- Version compatibility: Pinning plugin and theme versions for older Discourse installs (.discourse-compatibility)
- Ember object ownership: Ember object ownership (getOwner, service injections, etc.)
- JS performance: Using Google's 'tachometer' to measure JS performance changes in Discourse
- CI with GitHub Actions: Setup Continuous Integration using GitHub Actions
- Markdown extensions: Developer's guide to Markdown extensions
- Converting modals: Converting modals from legacy controllers to new DModal component API
- DModal API: Using the DModal API to render Modal windows (aka popups/dialogs) in Discourse
- PluginAPI: Using the PluginAPI in Site Customizations
- Plugin outlet connectors: Using Plugin Outlet Connectors from a Theme or Plugin
- ModifyClass: Using modifyClass for objects which are initialized early in boot
- Creating routes: Creating Routes in Discourse and Showing Data
- Authentication method: Adding a new 'managed' authentication method to Discourse
- Accidental serialization of ActiveRecord models: Preventing accidental serialization of ActiveRecord models
- (not recomended) Overriding Discourse templates from a Theme or Plugin
Plugins
- Basic plugin: Developing Discourse Plugins - Part 1 - Create a basic plugin
- Plugin outlet: Developing Discourse Plugins - Part 2 - Connect to a plugin outlet
- Automate plugin seup: Automating Discourse Plugin Setup with `create-discourse-plugin` gem
- Site settings: Developing Discourse Plugins - Part 3 - Add custom site settings
- Git setup: Developing Discourse Plugins - Part 4 - Setup git
- Admin interface: Developing Discourse Plugins - Part 5 - Add an admin interface
- Acceptance tests: Developing Discourse Plugins - Part 6 - Add acceptance tests
- Publish your plugin: Developing Discourse Plugins - Part 7 - Publish your plugin
- User settings: Add a custom per-user setting in a plugin
- New locales: Add a new locale from plugin
- Chat integration: Add a new provider to discourse-chat-integration
- Plugin translation: Add translation to a plugin
- Localization: Making Plugin Templates Localization friendly
- Override methods: Override existing Discourse methods in plugins
- Package as gem: Package a Discourse plugin as a gem
- markdown-it extension: Repackaging a markdown-it extension as a Discourse plugin
- Rails autoloading: Structuring a plugin for Rails autoloading
Themes & Components
- Beginners guide: Beginner's guide to developing Discourse Themes
- Quick reference: Theme Developer Quick Reference Guide
- Designers guide: Designer's Guide to getting started with themes in Discourse
- Theme Creator: Get started with Theme Creator and the Theme CLI
- Theme CLI: Install the Discourse Theme CLI console app to help you build themes
- Theme structure: Structure of themes and theme components
- Multiple JS files: Split up theme Javascript into multiple files
- Multiple SCSS files: Split up theme SCSS into multiple files
- Theme settings: Add settings to your Discourse theme
- Objects for theme settings: Objects type for theme setting
- Migrate settings: Migrate Discourse theme settings
- Theme metadata: Adding Metadata to a Theme
- Core variables: Use Discourse Core Variables in your Theme
- Localizable strings: Add localizable strings to themes and theme components
- E2E testing: End-to-end system testing for themes and theme components
- Minimizing maintenance: Minimizing Maintenance on Theme Customizations
- Font sizes: Change font sizes in your themes
- Include assets: Include assets (e.g. images, fonts) in themes and components
- Custom icons: Replace Discourse's default SVG icons with custom icons in a theme
- Dark mode: Update themes and plugins to support automatic dark mode
- Redirect route: Redirect an existing route in a theme component
- Theme modifiers: Theme modifiers: A brief introduction
- Ember.PromiseProxyMixin: Use Ember.PromiseProxyMixin in a theme
Interface
- Pseudo-elements: Insert text or images anywhere on your site using CSS pseudo-elements
- Custom header with dropdown: Add a custom header with a dropdown menu
- Font component: Create and share a font theme component
- Highlight.JS language: Install a new language for Highlight.JS via a theme component
- Homepage content: Add custom content that only appears on your homepage
- Featured topic list: Add a featured topic list to your Discourse homepage
- Message format: Message Format support for localization
- Global icon changes: Change icons globally
- Alternative icons: Alternative icons
- Wiki post style: Change the style of a wiki post
- Color scheme: Create and share a color scheme
- Custom reactions: Custom Discourse Reactions
- Mention colors: Customize mention colors
- Custom 404 page: Customize the 404 page ("Oops! That page doesn't exist or is private")
- Loading icon: Customize the loading icon
- New topic button: Customize the New Topic button
- Tooltip setup: Setup a ToolTip in your Forum
- Navigation menu: Use the `navigation_menu` query parameter to preview the sidebar or other options
- Blur NSFW content: Our solution for blurring NSFW content
Content
- Text snippets: Insertable, centrally maintained text/markdown snippets
- Code block backgrounds: Setup Code blocks that stand out, per-language backgrounds
- Post content styles: Customize posts' contents with your own styles
- Copyright protection: Add copyright protection to tagged topics
General Guides
- Getting started: Learn how to start building stuff for Discourse if you're newbie (like myself)
- White-labelling mobile apps: Things to consider before deciding to white-label the Discourse Mobile apps
- Custom automations: Create custom Automations
- Star ratings: Display star ratings for Discourse pages in search engine results (SERPs)
- Smart chatbot: Set up a smart chatbot on discourse 🤖
- Node-RED monitoring: Use Node-Red and Telegram to Monitor Discourse Status
- Mobile emulator: Test Discourse in mobile screen emulator
- Public data dump: Discourse Public Data Dump
Translations
- Ubuntu setup (Chinese): 🇨🇳 Installing the Discourse development environment on Ubuntu 在 Ubuntu 上安装 Discourse 开发环境