# Wiki

**URL:** https://meta.discourse.org/c/wiki/177.md?page=5

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 6

---

## [快速迁移到将 Web 和数据容器分开的方案](https://meta.discourse.org/t/migrate-quickly-to-separate-web-and-data-containers/153355)

<div class="topic-metadata">

**Author:** [@mcdanlj](https://meta.discourse.org/u/mcdanlj)\
**回覆:** 7\
**Last updated:** [2022年十一月6日 02:07 UTC](https://meta.discourse.org/t/migrate-quickly-to-separate-web-and-data-containers/153355 "2022-11-06T02:07:58Z")

</div>

:warning: Warning: If you are not comfortable working as a Linux systems administrator, and do not have experience with docker containers, moving to a multi-container deployment will cause you difficulty, and both staf…

---

## [重新排列话题和类别的软件架构](https://meta.discourse.org/t/script-framework-to-rearrange-topics-and-categories/241964)

<div class="topic-metadata">

**Author:** [@mcdanlj](https://meta.discourse.org/u/mcdanlj)\
**回覆:** 6\
**Last updated:** [2022年十月28日 00:42 UTC](https://meta.discourse.org/t/script-framework-to-rearrange-topics-and-categories/241964 "2022-10-28T00:42:07Z")

</div>

为了脚本化地重新排列一个大型 Discourse 站点，并与我的网站领导层合作，我编写了一个简单的框架，用于打包一系列 ruby 脚本，并通过 YAML 配置文件进行驱动。这样，我就可以在暂存站点上恢复备份，运行我的脚本，获得反馈，更改几行 YAML，恢复备份，用新配置运行脚本，然后重复，直到满意为止。 我的网站有近 600 行配置，通过 UI 手动操作是行不通的。更不用说多次操作来获得正确的结果了。我知道这一点，因为上次我提出进行大…

---

## [提供静态文件](https://meta.discourse.org/t/serve-static-file/80585)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 13\
**Last updated:** [2022年十月4日 21:47 UTC](https://meta.discourse.org/t/serve-static-file/80585 "2022-10-04T21:47:19Z")

</div>

Want to serve a static file at the root of your Discourse server? Here’s what to do. In the bottom of your app.yml file, down in the custom commands section, do something like this: ## Remember, this is YAML syntax - y…

---

## [使用 Discourse Docs 插件进行网站搜索和导航](https://meta.discourse.org/t/use-discourse-docs-plugin-for-site-search-and-navigation/239025)

<div class="topic-metadata">

**Author:** [@denvergeeks](https://meta.discourse.org/u/denvergeeks)\
**回覆:** 4\
**Last updated:** [2022年九月14日 22:00 UTC](https://meta.discourse.org/t/use-discourse-docs-plugin-for-site-search-and-navigation/239025 "2022-09-14T22:00:49Z")

</div>

Discourse Docs 插件不仅仅适用于知识库主题。 此插件同样能出色地为用户提供一个强大的工具，用于筛选和排序 Discourse 站点上的所有主题。 虽然您可以指定并限制分类以仅提供对主题子集（如知识库文章）的搜索，但您也可以将 Discourse Docs 视为一个辅助搜索工具，并具备高效的“钻取”功能……

---

## [通过 rails 控制台设置或更新推荐主题链接](https://meta.discourse.org/t/set-or-update-a-featured-topic-link-via-the-rails-console/166923)

<div class="topic-metadata">

**Author:** [@Canapin](https://meta.discourse.org/u/Canapin)\
**回覆:** 0\
**Last updated:** [2020年十月11日 22:22 UTC](https://meta.discourse.org/t/set-or-update-a-featured-topic-link-via-the-rails-console/166923 "2020-10-11T22:22:54Z")

</div>

You can set or update a featured link on a topic by using the rails console. From your server, enter the rails console from your Discourse folder: ./launcher enter app rails c You can then use the @nathank’s form to g…

---

## [添加新的Webhook并自定义Webhook负载](https://meta.discourse.org/t/add-new-webhooks-and-customize-webhook-payload/59609)

<div class="topic-metadata">

**Author:** [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**回覆:** 13\
**Last updated:** [2022年七月19日 10:55 UTC](https://meta.discourse.org/t/add-new-webhooks-and-customize-webhook-payload/59609 "2022-07-19T10:55:46Z")

</div>

Ever wonder how to add new webhook types? Or how to reduce the payload? Here is the tutorial for the plugin authors. It demos how to add the session and user notification event types as well as customization to the paylo…

---

## [将从 WordPress 发布到 Discourse 的帖子进行标记](https://meta.discourse.org/t/tag-posts-that-are-published-from-wordpress-to-discourse/99927)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**回覆:** 8\
**Last updated:** [2022年七月6日 11:11 UTC](https://meta.discourse.org/t/tag-posts-that-are-published-from-wordpress-to-discourse/99927 "2022-07-06T11:11:18Z")

</div>

Posts can now be tagged when they are published with the WP Discourse plugin. To tag a post, click on the Discourse meta box Advanced Options link to expand the meta box. Add tags to the Tag input, either one at a time, …

---

## [在隔离的 CentOS 7 服务器上安装 Discourse](https://meta.discourse.org/t/install-discourse-on-an-isolated-centos-7-server/73538)

<div class="topic-metadata">

**Author:** [@nil4](https://meta.discourse.org/u/nil4)\
**回覆:** 23\
**Last updated:** [2022年七月5日 11:15 UTC](https://meta.discourse.org/t/install-discourse-on-an-isolated-centos-7-server/73538 "2022-07-05T11:15:17Z")

</div>

Here is what worked for me to install Discourse on an isolated CentOS 7 server. In a nutshell, on a machine with internet access I prepared: the Git repos that Discourse setup needs: SamSaffron/pups, discourse/discours…

---

## [在你的单页应用中嵌入来自 Discourse 的评论](https://meta.discourse.org/t/embed-comments-from-discourse-in-your-single-page-app/231798)

<div class="topic-metadata">

**Author:** [@MK2k](https://meta.discourse.org/u/MK2k)\
**回覆:** 0\
**Last updated:** [2022年七月3日 13:45 UTC](https://meta.discourse.org/t/embed-comments-from-discourse-in-your-single-page-app/231798 "2022-07-03T13:45:38Z")

</div>

当尝试在不提供服务器端渲染页面的单页应用程序 (SPA) 中实现 \[1\] 时，您最终会遇到问题，请参阅：\[2\] 因此，经过一些调整，我想提出以下方法。示例使用 Vue.js，但可以轻松改编到其他框架/库。 注意：我将使用术语 博客文章 来指代应嵌入 Discourse 评论的部分。当然，这也可以指您网站上的各个页面。 1. \[1\] 中的问题 1.1. javascripts/embed.js 无法与客户端渲染内容配合使用 因此，您…

---

## [手动创建和还原 Discourse 备份](https://meta.discourse.org/t/manually-create-and-restore-discourse-backups/18273)

<div class="topic-metadata">

**Author:** [@elberet](https://meta.discourse.org/u/elberet)\
**回覆:** 13\
**Last updated:** [2022年六月16日 16:10 UTC](https://meta.discourse.org/t/manually-create-and-restore-discourse-backups/18273 "2022-06-16T16:10:07Z")

</div>

As discussed below, a warning for newbies: this is an advanced method! there is an automated, web UI way to restore from backups at /admin/backups which is so much easier. with the method below, no automatic backup is …

---

## [自定义Discourse 反应](https://meta.discourse.org/t/custom-discourse-reactions/198043)

<div class="topic-metadata">

**Author:** [@Don](https://meta.discourse.org/u/Don)\
**回覆:** 13\
**Last updated:** [2022年五月29日 15:40 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…

---

## [使用 rclone 将备份同步到 Dropbox 或 Google Drive](https://meta.discourse.org/t/use-rclone-to-sync-backups-to-dropbox-or-google-drive/97294)

<div class="topic-metadata">

**Author:** [@tophee](https://meta.discourse.org/u/tophee)\
**回覆:** 1\
**Last updated:** [2022年五月4日 22:44 UTC](https://meta.discourse.org/t/use-rclone-to-sync-backups-to-dropbox-or-google-drive/97294 "2022-05-04T22:44:54Z")

</div>

There is a plugin that allows you to sync your discourse backups to various cloud storage providers. Unfortunately, it currently doesn’t work with Dropbox and Google Drive. If you nevertheless want to store your backup o…

---

## [在上线之前建立一个沙盒来测试更改](https://meta.discourse.org/t/build-a-sandbox-to-test-changes-before-making-them-live/58298)

<div class="topic-metadata">

**Author:** [@JagWaugh](https://meta.discourse.org/u/JagWaugh)\
**回覆:** 20\
**Last updated:** [2022年二月16日 23:18 UTC](https://meta.discourse.org/t/build-a-sandbox-to-test-changes-before-making-them-live/58298 "2022-02-16T23:18:54Z")

</div>

Regardless of if you’re a moderator or an admin, you will no doubt at some time think about making some change to your live site and wonder if this will bring shame on you, and/or cause yourself an enormous amount of wor…

---

## [设置突出显示的代码块，不同语言的背景](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)\
**回覆:** 2\
**Last updated:** [2017年十月17日 14:10 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…

---

## [在Oracle Cloud免费层上安装Discourse](https://meta.discourse.org/t/install-discourse-on-oracle-cloud-free-tier/215749)

<div class="topic-metadata">

**Author:** [@Canapin](https://meta.discourse.org/u/Canapin)\
**回覆:** 0\
**Last updated:** [2022年一月23日 23:15 UTC](https://meta.discourse.org/t/install-discourse-on-oracle-cloud-free-tier/215749 "2022-01-23T23:15:36Z")

</div>

\<div data-theme-toc="true"\>\</div\> Oracle 提供了一个免费套餐，其中包括两台低配置虚拟机，能够运行 Discourse。 此试用版没有时间限制。 :warning: 这些虚拟机速度非常慢，我建议不要用它们来托管社区。 话虽如此，对于不介意速度慢的非常小的社区，或者用于个人项目/测试，它可能就足够了。 要求 一张信用卡号 - 您不会被收费，但注册免费账户需要它 一个域名 一个电子邮件提…

---

## [通过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)\
**回覆:** 2\
**Last updated:** [2021年十二月5日 19:41 UTC](https://meta.discourse.org/t/create-a-custom-badge-with-an-image-through-the-api/210616 "2021-12-05T19:41:55Z")

</div>

当然，包含的徽章……很不错。它们没有任何问题。但是，如果你想要更多呢？如果你想\_超越预定义的符号集\_呢？当然，有一个管理页面可以让你上传它们。但是如果你想制作大量的徽章呢？ 好消息！你可以通过 API 来实现。这里是用 Python 代码展示它是如何工作的。（而且它最后还会授予徽章，以防万一。） 即使你不是 Python 程序员，这段代码也应该很容易阅读。如果你愿意，甚至可以用 curl 在命令行中复制它。 这期望你的 API 密…

---

## [🇨🇳 Chinese Translation of FAQ 使用守則 中文翻譯](https://meta.discourse.org/t/chinese-translation-of-faq/202627)

<div class="topic-metadata">

**Author:** [@changyuheng](https://meta.discourse.org/u/changyuheng)\
**回覆:** 0\
**Last updated:** [2021年九月4日 18:20 UTC](https://meta.discourse.org/t/chinese-translation-of-faq/202627 "2021-09-04T18:20:17Z")

</div>

Continuing the discussion from Feature Request: Translation of FAQ/Terms of Service/Privacy: This is a Civilized Place for Discussion 這是一個文明的討論區 Please treat this discussion forum with the same respect you would a pub…

---

## [🇨🇳 How to change the domain name | 如何修改 Discourse 的域名](https://meta.discourse.org/t/how-to-change-the-domain-name-discourse/202567)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 0\
**Last updated:** [2021年九月3日 20:06 UTC](https://meta.discourse.org/t/how-to-change-the-domain-name-discourse/202567 "2021-09-03T20:06:31Z")

</div>

本篇文章翻译自英文的原文： Change the domain name or rename your Discourse :warning: 如果你参考了 GitHub 上的安装指南 页面中的内容安装了一个 Discourse 实例后希望对自己安装的实例修改域名的使用手册。 如果你使用的是 Discourse 官方主机服务 的话，请参考 针对 Discourse 的云服务配置你的域名 页面中的详细内容。 假设，你现在…

---

## [创建带有类别和主题模板的新主题按钮](https://meta.discourse.org/t/create-a-new-topic-button-with-category-and-topic-template/85775)

<div class="topic-metadata">

**Author:** [@bombledmonk](https://meta.discourse.org/u/bombledmonk)\
**回覆:** 13\
**Last updated:** [2021年九月3日 17:00 UTC](https://meta.discourse.org/t/create-a-new-topic-button-with-category-and-topic-template/85775 "2021-09-03T17:00:23Z")

</div>

I’m looking at the following theme as a reference. My goal is to find a way to put up a secondary new topic button that shows up for members of a specific group. This group has access to a private area in the forum an…

---

## [在主题组件中重定向现有路由](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)\
**回覆:** 0\
**Last updated:** [2021年八月27日 12:33 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…

---

## [修复由 WP Discourse 和 RSS 插件创建的帖子中的损坏图片](https://meta.discourse.org/t/fix-broken-images-for-posts-created-by-the-wp-discourse-and-rss-plugins/160773)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**回覆:** 33\
**Last updated:** [2021年八月20日 20:35 UTC](https://meta.discourse.org/t/fix-broken-images-for-posts-created-by-the-wp-discourse-and-rss-plugins/160773 "2021-08-20T20:35:01Z")

</div>

There is a case where images published to Discourse through the WP Discourse and RSS plugins can be broken. This can happen when the full post content is published to Discourse with the WP Discourse plugin and the WordPr…

---

## [使用 Discourse SSO 与 Mediawiki](https://meta.discourse.org/t/use-discourse-sso-with-mediawiki/69218)

<div class="topic-metadata">

**Author:** [@SXX](https://meta.discourse.org/u/SXX)\
**回覆:** 16\
**Last updated:** [2021年八月2日 10:46 UTC](https://meta.discourse.org/t/use-discourse-sso-with-mediawiki/69218 "2021-08-02T10:46:11Z")

</div>

While trying to find ready-to-use solution I’ve seen multiple questions on Internet about that and at least one topic on this forum. I also need to integrate Discourse SSO with Mantis Bug Tracker so I decide to go with m…

---

## [🇨🇳 How to bulk move topics to different categories | 如何在 Discourse 中批量移动主题到不同的分类中](https://meta.discourse.org/t/how-to-bulk-move-topics-to-different-categories-discourse/197989)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 2\
**Last updated:** [2021年七月28日 19:35 UTC](https://meta.discourse.org/t/how-to-bulk-move-topics-to-different-categories-discourse/197989 "2021-07-28T19:35:48Z")

</div>

在社区运行一段时间以后，我们可能需要对社区的内容进行调整。 这篇文章介绍了如何在 Discourse 中批量从一个分类移动到另一个分类。 例如，我们需要将下面的主题批量从当前的分类中移动到另外一个叫做 数据库 的分类中。 操作步骤 下面描述了相关的步骤。 选择 选择你需要移动的主题。 这个是操作的第一步，如下图所示，选择主题前面的图标。 然后所有的主题都变成可以选择的选项了，然后再在页面的右侧单击调整的按钮。 批…

---

## [🇨🇳 Configure Google login in Discourse 在 Discourse 中配置 Google 登录](https://meta.discourse.org/t/configure-google-login-in-discourse-discourse-google/197635)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 0\
**Last updated:** [2021年七月19日 22:04 UTC](https://meta.discourse.org/t/configure-google-login-in-discourse-discourse-google/197635 "2021-07-19T22:04:14Z")

</div>

这篇文章展示了如何在 Discourse 中配置注册使用 Google OAuth2 来进行登录。 Google 控制台配置 进入 https://console.developers.google.com ，然后再左上方单击 选择一个项目（Select a project）。 新项目 在顶部的右侧，单击 新项目（New Project）。 输入项目信息 在 项目名称（Project Name） 字段中输入项目的名称，你…

---

## [根据Google表单回应创建帖子](https://meta.discourse.org/t/create-posts-from-google-forms-responses/21008)

<div class="topic-metadata">

**Author:** [@lightyear](https://meta.discourse.org/u/lightyear)\
**回覆:** 4\
**Last updated:** [2021年六月18日 01:04 UTC](https://meta.discourse.org/t/create-posts-from-google-forms-responses/21008 "2021-06-18T01:04:11Z")

</div>

Heyah, I have written a short script automatically posting new Google-Form-Entries to Discourse. You can use it to allow any kind of 3-party Data input into discourse for example: Anonymous Feedback Support-Request Me…

---

## [自定义加载图标](https://meta.discourse.org/t/customize-the-loading-icon/165743)

<div class="topic-metadata">

**Author:** [@Canapin](https://meta.discourse.org/u/Canapin)\
**回覆:** 7\
**Last updated:** [2021年六月16日 18:12 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…

---

## [将特色图片链接回其Wordpress文章](https://meta.discourse.org/t/link-a-featured-image-back-to-its-wordpress-post/192560)

<div class="topic-metadata">

**Author:** [@RichardC](https://meta.discourse.org/u/RichardC)\
**回覆:** 0\
**Last updated:** [2021年六月3日 13:46 UTC](https://meta.discourse.org/t/link-a-featured-image-back-to-its-wordpress-post/192560 "2021-06-03T13:46:38Z")

</div>

Send your featured image from Wordpress to Discourse so that clicking on the image in Discourse takes you back to the wordpress post. Here’s what works for me. Hope it helps: add\_filter( 'discourse\_publish\_format\_html',…

---

## [查看WP Discourse插件的日志](https://meta.discourse.org/t/view-logs-for-the-wp-discourse-plugin/190745)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**回覆:** 0\
**Last updated:** [2021年五月18日 01:54 UTC](https://meta.discourse.org/t/view-logs-for-the-wp-discourse-plugin/190745 "2021-05-18T01:54:12Z")

</div>

The WP Discourse plugin has its own logging system (since v2.2.5). This is an overview of how it works and how to use it. If you have any questions please respond below. What is logged All of the main WP Discourse featu…

---

## [在主题按钮中集成 Jira 问题收集器](https://meta.discourse.org/t/integrate-jira-issue-collectors-within-topic-buttons/190442)

<div class="topic-metadata">

**Author:** [@JustinBack](https://meta.discourse.org/u/JustinBack)\
**回覆:** 0\
**Last updated:** [2021年五月14日 19:53 UTC](https://meta.discourse.org/t/integrate-jira-issue-collectors-within-topic-buttons/190442 "2021-05-14T19:53:24Z")

</div>

Hello :wave: I started implementing Issue collectors in our forum today and wanted to share the super simple theme component I created. In the end, it will look like this. What you need A Jira issue collector …

---

## [恢复已被删除的长主题](https://meta.discourse.org/t/restore-a-long-topic-that-has-been-deleted/180986)

<div class="topic-metadata">

**Author:** [@neounix](https://meta.discourse.org/u/neounix)\
**回覆:** 0\
**Last updated:** [2021年二月24日 08:58 UTC](https://meta.discourse.org/t/restore-a-long-topic-that-has-been-deleted/180986 "2021-02-24T08:58:16Z")

</div>

On our forums, we had a long topic with over 300 posts with a commercial webdev client and for some reason, that entire topic vanished a few day ago after moving a few posts to a different topic. I checked the user acti…

[上一頁](https://meta.discourse.org/c/wiki/177.md?page=4)

[下一頁](https://meta.discourse.org/c/wiki/177.md?page=6)
