# 将插件添加到 app.yml 的格式问题

**URL:** https://meta.discourse.org/t/formatting-issues-adding-plugins-to-app-yml/307381
**Category:** Self-hosting
**Created:** [2024年五月5日 15:31 UTC](https://meta.discourse.org/t/formatting-issues-adding-plugins-to-app-yml/307381 "2024-05-05T15:31:01Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [2024年五月9日 10:25 UTC](https://meta.discourse.org/t/formatting-issues-adding-plugins-to-app-yml/307381/8 "2024-05-09T10:25:43Z")

</div>

> [@Master](#):
>
> 现在编译后，最后出现了这个错误
> 
> ![Captura de pantalla 2024-05-05 115904](https://global.discourse-cdn.com/meta/original/4X/4/e/b/4eb5f908f5dbb02326a384d5848e49df0b23b4db.png)

从您之前发布的这张图片来看：

> [@Master](#):
>
> 这个
> 
> ![dc46cc47d1c3f32d8464af5657f94d3b](https://global.discourse-cdn.com/meta/original/4X/0/0/0/00081b7f78ebb02ddb032ae12e019300a5515e38.png)

您还需要遵循第一个原始行的格式，如这里所述：

> [@techAPJ](#):
>
> 将插件的 `git clone` url 添加到包含 `git clone https://github.com/discourse/docker_manager.git` 的行下方。
> 
> 遵循 `docker_manager.git` 行现有的格式；如果它不包含 `sudo -E -u discourse`，则插入 `- git clone https://github.com/discourse/discourse-solved.git`。

所以您的可能需要看起来像这样：

```plaintext

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-akismet.git
          - git clone https://github.com/discourse/discourse-whos-online.git

```

---

_[View the full topic](https://meta.discourse.org/t/formatting-issues-adding-plugins-to-app-yml/307381)._
