<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Discourse &#8211; 李辉 / Grey Li</title>
	<atom:link href="https://greyli.com/tag/discourse/feed/" rel="self" type="application/rss+xml" />
	<link>https://greyli.com</link>
	<description>一个编程和写作爱好者的在线记事本</description>
	<lastBuildDate>Thu, 06 Nov 2025 11:36:11 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.26</generator>

<image>
	<url>https://greyli.com/wp-content/uploads/2025/03/avatar-500-compressed-144x144.jpg</url>
	<title>Discourse &#8211; 李辉 / Grey Li</title>
	<link>https://greyli.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>为 Discourse 安装插件</title>
		<link>https://greyli.com/install-discourse-plugins/</link>
		<comments>https://greyli.com/install-discourse-plugins/#respond</comments>
		<pubDate>Sun, 03 Mar 2019 02:44:07 +0000</pubDate>
		<dc:creator><![CDATA[李辉]]></dc:creator>
				<category><![CDATA[计算机与编程]]></category>
		<category><![CDATA[Discourse]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://greyli.com/?p=2373</guid>
		<description><![CDATA[不得不说，Discourse 的插件安装方式真是麻烦（免费的代价&#8230;&#8230;）。官方的插件 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>
	不得不说，Discourse 的插件安装方式真是麻烦（免费的代价&hellip;&hellip;）。官方的插件目录在&nbsp;<a href="https://www.discourse.org/plugins">https://www.discourse.org/plugins</a> 可以看到，插件介绍页面并没有介绍如何安装插件，只介绍了某个付费版本的套餐内置了这些插件。
</p>
<p>
	这次一共安装了三个插件：
</p>
<ul>
<li>
		<a href="https://www.discourse.org/plugins/solved.html">Sloved</a>：因为 <a href="https://discuss.helloflask.com">HelloFlask 论坛</a>越来越像一个工单处理系统，所以能够标记问题已解决的 Solved 插件会很有用。
	</li>
<li>
		<a href="https://www.discourse.org/plugins/sitemap.html">Sitemap</a>：生成站点地图。
	</li>
<li>
		<a href="https://www.discourse.org/plugins/canned-replies.html">Canned Replies</a>：能够预先保存某些经常发布的回复（staff only）。因为太多人发帖时论坛说明也不看，markdown 也不会用，写得乱七八糟，每次都要一一提醒，所以这个插件可以节省不必要的体力开支。
	</li>
</ul>
<p>
	具体的安装方法可以在官方论坛的<a href="https://meta.discourse.org/t/install-plugins-in-discourse/19157">这个帖子</a>看到。步骤并不复杂，下面是一个简化版本的安装介绍：
</p>
<p>
	首先获取到你要安装的插件的 GitHub 或 BitBucket 仓库地址，官方插件可以在&nbsp;Discourse 的 <a href="https://github.com/discourse">GitHub 组织</a>中找到。这里以投票插件为例，它的仓库地址为&nbsp;https://github.com/discourse/discourse-voting。
</p>
<p>
	<strong>1. 打开配置文件</strong>
</p>
<p>
	登录到你的服务器，执行下面的命令，编辑配置文件 app.yml：
</p>
<pre>
$ cd /var/discourse
$ nano containers/app.yml</pre>
<p>
	<strong>2. 插入插件的仓库地址</strong>
</p>
<p>
	在这个文件中，找到 hooks 一节，把插件地址写到 `- git clone https://github.com/discourse/docker_manager.git` 一行的下面，注意在地址前添加 `- git clone`：
</p>
<pre>
hooks: 
&nbsp;after_code: 
&nbsp;   - exec: 
&nbsp;      cd: $home/plugins 
&nbsp;      cmd: 
&nbsp;        - git clone https://github.com/discourse/docker_manager.git 
&nbsp;        - git clone https://github.com/discourse/discourse-voting.git
</pre>
<p>
	<strong>3. 重新构建容器</strong>
</p>
<p>
	使用下面的命令重新构建容器（确保没有改变当前目录，即 `/var/discourse`）：
</p>
<pre>
./launcher rebuild app</pre>
<p>
	经过漫长的等待，安装就完成了。你可以在论坛的设置-插件页面对插件进行配置。</p>
]]></content:encoded>
			<wfw:commentRss>https://greyli.com/install-discourse-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
