插件和主题组件通过了重建,但无法使用?

按照文档,我在 yaml 中添加了一些 Theme 组件和插件:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-reactions.git
          - git clone https://github.com/paviliondev/discourse-ratings.git
          - git clone https://github.com/discourse/reader-mode.git
          - git clone https://github.com/VaperinaDEV/discourse-modal-grip.git
          - git clone https://github.com/nolosb/discourse-tag-styles.git
          - git clone https://github.com/merefield/discourse-tc-tag-cloud.git

./launcher rebuild 似乎运行正常:

[...]
I, [2024-05-16T10:49:19.172929 #1]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2024-05-16T10:49:19.173814 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2024-05-16T10:49:20.511901 #1]  INFO -- :
I, [2024-05-16T10:49:20.512493 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/discourse/discourse-reactions.git
Cloning into 'discourse-reactions'...
I, [2024-05-16T10:49:21.315121 #1]  INFO -- :
I, [2024-05-16T10:49:21.315491 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/paviliondev/discourse-ratings.git
Cloning into 'discourse-ratings'...
I, [2024-05-16T10:49:21.917044 #1]  INFO -- :
I, [2024-05-16T10:49:21.917367 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/discourse/reader-mode.git
Cloning into 'reader-mode'...
I, [2024-05-16T10:49:22.499069 #1]  INFO -- :
I, [2024-05-16T10:49:22.499672 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/VaperinaDEV/discourse-modal-grip.git
Cloning into 'discourse-modal-grip'...
I, [2024-05-16T10:49:23.030998 #1]  INFO -- :
I, [2024-05-16T10:49:23.031349 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/nolosb/discourse-tag-styles.git
Cloning into 'discourse-tag-styles'...
I, [2024-05-16T10:49:23.535520 #1]  INFO -- :
I, [2024-05-16T10:49:23.535773 #1]  INFO -- : > cd /var/www/discourse/plugins & git clone https://github.com/merefield/discourse-tc-tag-cloud.git
Cloning into 'discourse-tc-tag-cloud'...
I, [2024-05-16T10:49:24.330857 #1]  INFO -- :

[....]

I, [2024-05-16T10:52:07.932848 #1]  INFO -- : > cd /var/www/discourse & su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2024-05-16T10:52:15.062445 #1]  INFO -- : discourse-modal-grip is already at latest compatible version
discourse-ratings is already at latest compatible version
discourse-reactions is already at latest compatible version
discourse-tag-styles is already at latest compatible version
discourse-tc-tag-cloud is already at latest compatible version
docker_manager is already at latest compatible version
reader-mode is already at latest compatible version

但是,站点重启后只有其中一部分生效了。只有一个在 /admin/customize/components 下,其他是在设置页面搜索到的。
这是与 3.3.0b3 版本的兼容性问题吗?我可以在日志中在哪里看到它,以了解导致某些插件被跳过(例如 Discourse-ratings、reader-mode 等)的原因。

1 个赞

这就是安装插件的方法。但是要安装主题组件,您需要遵循 Installing a theme or theme component

2 个赞

我试过了,但收到一条消息说 GIT URL 不包含主题组件,所以我尝试了另一种方法。我明白了。它仍然不包含 discourse-ratings,无论哪种方式都没有安装。

1 个赞

这些是主题组件。

https://github.com/discourse/reader-mode
https://github.com/VaperinaDEV/discourse-modal-grip
https://github.com/nolosb/discourse-tag-styles
https://github.com/merefield/discourse-tc-tag-cloud

从您的 app.yml 文件中删除它们,并按照文档进行安装:

5 个赞

是的。删除了那 4 个,并且确实成功地将它们添加为组件,但我仍然有 discourse-ratings,它已安装并在设置中显示,已启用,但主题中没有显示任何小部件。我将专注于此。感谢您的帮助!

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.