-
第 1 章
Developer Guides
102 页
- 1.1 Discourse Developer Docs [!TIP] If you just want to browse the existing docs, head over to https://meta.discourse.org/c/documentatio... 20 小时前
- 1.2 index Documentation about extending Discourse with plugins, themes, and theme components, working with the core c... 20 小时前
- 1.3 Introduction to Discourse Development Discourse is a modern and highly-customizable platform for building communities. This documentation is inte... 20 小时前
- 1.4 Developing Discourse using a Dev Container Dev Containers is an open standard for configuring a development environment inside a container. This almos... 20 小时前
- 1.5 Developing Discourse on GitHub Codespaces GitHub Codespaces is a very fast way to get started with Discourse development. Their free tier is good for... 20 小时前
- 1.6 Install Discourse for development using Docker Developing using Docker Since Discourse runs in Docker, you should be able to run Discourse directly from y... 20 小时前
- 1.7 Install Discourse on macOS for development :warning: This guide covers installation instructions for a macOS development environment, for production g... 20 小时前
- 1.8 Install Discourse on Ubuntu or Debian for Development :warning: This guide covers installation instructions in a development environment. For a production guide ... 20 小时前
- 1.9 Install Discourse on Windows for development :information_source: This tutorial has been tested on Windows 10 and 11. To set up a development environmen... 20 小时前
- 1.10 Install plugins in your non-Docker development environment (This guide only covers non-docker dev install. For Docker dev :whale: see https://meta.discourse.org/t/beg... 20 小时前
- 1.11 Set up a local Discourse Development Environment? So you want to set up Discourse locally to hack on and develop with? This root guide links all the #dev-ins... 20 小时前
- 1.12 Set up a multisite development environment It's possible to run discourse in multisite mode in development. A multisite server uses a different DB and... 20 小时前
- 1.13 Set up Discourse for development on Fedora Linux This guide has been tested against a fresh install of Fedora 31 and 33, but may work on older versions that... 20 小时前
- 1.14 Add Ember Components to Discourse In the previous tutorial I showed how to configure both the server and the client side parts of Discourse t... 20 小时前
- 1.15 The UI kit of shared Discourse components, helpers, and modifiers ui-kit is the layer of reusable, domain-free building blocks that core, plugins, and themes compose their i... 20 小时前
- 1.16 Automatically lint and format code before commits Discourse uses lefthook for git hooks, and bin/lint as the main CLI entry point for running the same check... 20 小时前
- 1.17 Write acceptance tests and component tests for Ember code in Discourse Automated tests are a great way to protect your code against future regressions. Many people are familiar w... 20 小时前
- 1.18 How to run Discourse core, plugin and theme QUnit test suites Discourse has extensive frontend tests for core, plugins and themes. Once you have a functioning local deve... 20 小时前
- 1.19 Pinning plugin and theme versions for older Discourse installs (d-compat branches) 📖 Background Theme and plugin developers generally want to target the latest release of Discourse, without... 20 小时前
- 1.20 Ember object ownership (getOwner, service injections, etc.) :warning: Importing getOwner from discourse-common/lib/get-owner is deprecated. To access e.g. services th... 20 小时前
- 1.21 Using Google's 'tachometer' to measure JS performance changes in Discourse When working on client-side work in Discourse core/plugins/themes, it's important to consider the performan... 20 小时前
- 1.22 Setup Continuous Integration using GitHub Actions To build a robust extension for Discourse, it can be wise to include Continuous Integration (CI) into your ... 20 小时前
- 1.23 Developer's guide to Markdown extensions Discourse uses a Markdown engine called Markdown-it. Here are some dev notes that will help you either fix ... 20 小时前
- 1.24 Converting modals from legacy controllers to new DModal component API :information_source: If you're implementing a new Modal, check out the main docs here. This topic describes... 20 小时前
- 1.25 Using the DModal API to render Modal windows (aka popups/dialogs) in Discourse Discourse 3.1.0.beta6 ships with a brand new <DModal> component-based API. DModal is part of the UI kit a... 20 小时前
- 1.26 Using the JS API Discourse's JavaScript API allows themes and plugins to make extensive customizations to the user experienc... 20 小时前
- 1.27 Using Plugin Outlet Connectors from a Theme or Plugin Discourse includes hundreds of Plugin Outlets which can be used to inject new content or replace existing c... 20 小时前
- 1.28 Using modifyClass to change core behavior For advanced themes and plugins, Discourse offers the modifyClass system. This allows you to extend and ov... 20 小时前
- 1.29 Creating Routes in Discourse and Showing Data Over time Discourse has grown in complexity and it can be daunting for beginners to understand how data get... 20 小时前
- 1.30 Adding a new 'managed' authentication method to Discourse Continuing from https://meta.discourse.org/t/future-social-authentication-improvements/94691... We are now ... 20 小时前
- 1.31 Preventing accidental serialization of ActiveRecord models We've introduced a patch to prevent the accidental serialization of ActiveRecord models without specifying ... 20 小时前
- 1.32 (not recommended) Overriding Discourse templates from a Theme or Plugin Ideally, when customizing Discourse via themes/plugins, you should use CSS, the JavaScript Plugin API, or p... 20 小时前
- 1.33 Overview A service is a small object that encompasses business logic for a given action. From outside, it should be ... 20 小时前
- 1.34 Write end-to-end system specs for the Discourse user interface Rails system specs are used to simulate the actions of a real user using the app in a browser. We use the ... 20 小时前
- 1.35 Discourse toolkit to render forms. Basic Usage FormKit exposes a single component as its public API: <Form />. All other elements are yielded... 20 小时前
- 1.36 AppEvents Triggers Reference AppEvents The AppEvent system in Discourse provides a pub/sub mechanism for handling UI updates and compone... 20 小时前
- 1.37 Using Transformers to customize client-side values and behavior Discourse core includes a number of "transformer" hooks which can be used to customize client behavior. The... 20 小时前
- 1.38 Customizing the topic list The topic-list is one of the most-used and most-customized user-interfaces in Discourse. There are many dif... 20 小时前
- 1.39 Guidelines for CSS classes using BEM When writing CSS classes for Discourse components, themes, or plugins, we follow a modified variant of Bloc... 20 小时前
- 1.40 JavaScript type hinting & validation (typescript) Discourse ships type information for its JavaScript code. This can provide inline documentation, autocomple... 20 小时前
- 1.41 Designing for Different Devices (Touch & Hover) This document outlines the APIs used to adapt Discourse's user interface for different devices. Touch & Hov... 20 小时前
- 1.42 Designing for Responsive Widths (Breakpoints, Viewport & Containers) This document outlines the APIs used to adapt Discourse's user interface to different widths — both the bro... 20 小时前
- 1.43 Drag, resize, and gesture primitives ui-kit ships the input-driven gesture primitives: dragging a payload onto a target, resizing a region, and ... 20 小时前
- 1.44 Bundle splitting for plugins By default, every javascript module in a plugin is loaded when Discourse boots. This guide describes the s... 20 小时前
- 1.45 Private modules and the `-internals` convention What -internals means A folder named -internals holds code that is not public API. It may be renamed, res... 20 小时前
- 1.46 Developing Discourse Plugins - Part 1 - Create a basic plugin Building a plugin in Discourse can be really simple, once you learn a couple of quirks. The goal of this po... 20 小时前
- 1.47 Developing Discourse Plugins - Part 2 - Connect to a plugin outlet Previous tutorial: https://meta.discourse.org/t/developing-discourse-plugins-part-1-create-a-basic-plugin/3... 20 小时前
- 1.48 Developing Discourse Plugins - Part 3 - Add custom site settings Previous tutorial: https://meta.discourse.org/t/developing-discourse-plugins-part-2-connect-to-a-plugin-out... 20 小时前
- 1.49 Developing Discourse Plugins - Part 4 - Setup git Previous tutorial: https://meta.discourse.org/t/developing-discourse-plugins-part-3-add-custom-site-setting... 20 小时前
- 1.50 Developing Discourse Plugins - Part 5 - Add an admin interface Previous tutorial: https://meta.discourse.org/t/developing-discourse-plugins-part-4-setup-git/31272 Sometim... 20 小时前
- 1.51 Developing Discourse Plugins - Part 6 - Add acceptance tests Previous tutorial: https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/... 20 小时前
- 1.52 Developing Discourse Plugins - Part 7 - Publish your plugin Previous tutorial: https://meta.discourse.org/t/developing-discourse-plugins-part-6-add-acceptance-tests/32... 20 小时前
- 1.53 Add a new locale from plugin Usually the best way to add a new language to Discourse is by creating a pull request as described in "http... 20 小时前
- 1.54 Add a new provider to discourse-chat-integration discourse-chat-integration abstracts away the boilerplate for integrating Discourse with external chatroom ... 20 小时前
- 1.55 Repackaging a markdown-it extension as a Discourse plugin markdown.it the CommonMark engine used by Discourse has a wide array of plugins Header anchors, definition ... 20 小时前
- 1.56 Structuring a plugin for Rails autoloading Many plugins include lots of class definitions inside plugin.rb, or use require_relative to load ruby fil... 20 小时前
- 1.57 Developing Discourse Themes & Theme Components Discourse Themes and Theme Components can be used to customize the look, feel and functionality of Discours... 20 小时前
- 1.58 Theme Developer Quick Reference Guide As themes grow more powerful, there's more to remember about how they work. We have loads of detailed docum... 20 小时前
- 1.59 Designer's Guide to getting started with themes in Discourse So you're interested in in designing your own theme for Discourse? You've arrived at the right topic :smile... 20 小时前
- 1.60 Get started with Theme Creator and the Theme CLI This topic will walk you through how to use the Theme CLI with our Theme Creator site to develop a theme an... 20 小时前
- 1.61 Install the Discourse Theme CLI console app to help you build themes The Discourse Theme CLI is a ruby gem that allows you to use your editor of choice when developing Discou... 20 小时前
- 1.62 Structure of themes and theme components Discourse supports native themes that can be sourced from a .tar.gz archive or from a remote git repositor... 20 小时前
- 1.63 Split up theme Javascript into multiple files Complex theme javascript can be split into multiple files, to keep things nicely organised. To use this fun... 20 小时前
- 1.64 Split up theme SCSS into multiple files Themes and theme components are becoming steadily more powerful, and developers are getting more and more a... 20 小时前
- 1.65 Add settings to your Discourse theme Discourse has the ability for themes to have "settings" that can be added by theme developers to allow site... 20 小时前
- 1.66 Objects type for theme setting We are introducing a new type: objects to the supported types for theme settings which can be used to repl... 20 小时前
- 1.67 Migrate Discourse theme settings Introduction As of Discourse version 3.2.0.beta3, Discourse themes/components can leverage a migrations fea... 20 小时前
- 1.68 Adding metadata and screenshots to a Theme You can add various pieces of metadata to a theme. Some are stored in the about.json file, and some are st... 20 小时前
- 1.69 Use Discourse Core Variables in your Theme Discourse is incredibly customizable! The goal of this topic is to show you how make use of all the amazing... 20 小时前
- 1.70 Add localizable strings to themes and theme components For those looking to add custom languages and translations to a Discourse theme or theme component, they ca... 20 小时前
- 1.71 End-to-end system testing for themes and theme components Writing automated tests for themes is an important part of the theme development process which can help ens... 20 小时前
- 1.72 Minimizing Maintenance on Theme Customizations Discourse is highly customizable, enabling you to modify almost any aspect of its appearance through themes... 20 小时前
- 1.73 Change font sizes in your themes The simplest way to change the font size of your entire community would be to override the default value on... 20 小时前
- 1.74 Include assets (e.g. images, fonts) in themes and components Themes and theme components allow you to handle uploaded assets such as images and fonts. You can control w... 20 小时前
- 1.75 Replace Discourse's default SVG icons with custom icons in a theme You can replace a Discourse's default SVG icons individually or as a whole with your own custom SVG and ove... 20 小时前
- 1.76 Update themes and plugins to support automatic dark mode Previously, all colors in Discourse were stored as SCSS variables. To support automatic dark mode color sch... 20 小时前
- 1.77 Theme modifiers: A brief introduction As themes become more ambitious, we've been looking for ways to allow them to manipulate core server-side b... 20 小时前
- 1.78 Insert text or images anywhere on your site using CSS pseudo-elements So, you want to insert some text or image in your Discourse site. Regarding the text in most cases it is su... 20 小时前
- 1.79 Create and share a font theme component Discourse supports importing themes containing assets from a remote repository. This allows theme authors t... 20 小时前
- 1.80 Install a new language for Highlight.JS via a theme component I've just added a hook to our HighlightJS code so now you can use the plugin API to add a custom language f... 20 小时前
- 1.81 Add custom content that only appears on your homepage A very common situation you'll find yourself in as a theme developer is the need to create content that onl... 20 小时前
- 1.82 Message Format support for localization In Discourse all Message Format strings have a key that ends with "_MF". The Crowdin Editor has a preview t... 20 小时前
- 1.83 Change icons globally This is an easy way to change a Discourse icon globally. Right click on the icon you want to change and sel... 20 小时前
- 1.84 Alternative icons By default, Discourse bundles icons from the excellent FontAwesome library. But there are a lot of free-to-... 20 小时前
- 1.85 Change the style of a wiki post A quick guide to change the style of your wiki posts: Change the background color: In your /admin/customiz... 20 小时前
- 1.86 Create and share a color scheme Discourse now supports importing color schemes from remote repository. Here I will demonstrate how you woul... 20 小时前
- 1.87 Use the `navigation_menu` query parameter to preview the sidebar or other options If you are working on a theme for an existing site and want to preview how it will look with the sidebar or... 20 小时前
- 1.88 Customize posts' contents with your own styles Requirements :information_source: To be able to use these tips and tricks, you need to be an administrator ... 20 小时前
- 1.89 Adding preview screenshots to Discourse themes :bookmark: This guide explains how to add preview screenshots to your Discourse theme to showcase how it lo... 20 小时前
- 1.90 Controlling site settings with themes Themeable site settings allow a theme (not components) to override a small subset of core site settings, wh... 20 小时前
- 1.91 Things to consider before deciding to white-label the Discourse Mobile apps Since we released the iOS and Android apps a number of people have asked expressed interest in white labeli... 20 小时前
- 1.92 Create custom Automations :information_source: This is a draft, and may need some extra work. Vocabulary trigger: represents the name... 20 小时前
- 1.93 Discourse Public Data Dump Given the advent of AI and the need for large datasets on local development machines, we have pulled togeth... 20 小时前
- 1.94 Overview The Discourse AI plugin ships a Ruby CLI under plugins/discourse-ai/evals that exercises AI features again... 20 小时前
- 1.95 Using the AI bot via the Discourse API Overview Discourse AI exposes an admin/API endpoint for streaming an AI Agent reply over a raw chunked HTTP... 20 小时前
- 1.96 Theme Developer Tutorial: 1. Introduction This tutorial will teach you how to create a Discourse Theme or Theme Component from the ground up. While t... 20 小时前
- 1.97 Theme Developer Tutorial: 2. Creating a remote theme In the last chapter, we created a basic theme via the Discourse admin interface. This works well enough for... 20 小时前
- 1.98 Theme Developer Tutorial: 3. CSS in Themes Technically, Discourse uses SCSS to author its stylesheets. However, we're increasingly moving towards nati... 20 小时前
- 1.99 Theme Developer Tutorial: 4. Using Outlets to insert and replace content Discourse uses the Ember JS Framework for its user interface. On top of Ember, Discourse provides a number ... 20 小时前
- 1.100 Theme Developer Tutorial: 5. Building and using components In the last chapter, we explored how you can render Glimmer Components into plugin outlets, and moved our ... 20 小时前
- 1.101 Theme Developer Tutorial: 6. Using the JS API In the last couple of chapters, we've explored how to use the JavaScript API to render content into outlets... 20 小时前
- 1.102 Theme Developer Tutorial: 7. Wrapping up This tutorial has been a whistle-stop tour through the process of creating a Discourse theme and experiment... 20 小时前
- 103 ADMIN-QUICK-START-GUIDE Welcome to your new community, and thank you for choosing Discourse! 📫 Test your email configuration Email ... 20 小时前
- 104 AUTHORS ⚠ This document only reflects the team at the time of the original release in February 2013. For a more det... 20 小时前
- 105 Install Discourse on a Cloud Server To install and self-host Discourse, follow the steps below. But if you'd rather skip the setup, maintenance... 20 小时前
- 106 INSTALL-email Recommended Email Providers for Discourse We strongly recommend using a dedicated email service. Email serv... 20 小时前
- 107 INSTALL To install and self-host Discourse, follow the steps below. But if you'd rather skip the setup, maintenance... 20 小时前
- 108 List of Discourse Plugins If you just want to get some plugins for your Discourse instance, check out the plugin category at meta. Th... 20 小时前
- 109 Discourse Security We take security very seriously at Discourse. We welcome any peer review of our 100% open source code to en... 20 小时前
- 110 Discourse Developer Testing Guide Some notes about testing Discourse: MailHog Discourse depends heavily on (sending) email for notifications.... 20 小时前
- 111 Contributor Covenant Code of Conduct Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassm... 20 小时前