# 横幅精选链接

**URL:** <https://meta.discourse.org/t/banner-featured-links/327497>\
**Category:** Theme component\
**Created:** [2024年九月21日 07:57 UTC](https://meta.discourse.org/t/banner-featured-links/327497 "2024-09-21T07:57:13Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2026年二月20日 21:47 UTC](https://meta.discourse.org/t/banner-featured-links/327497/22 "2026-02-20T21:47:01Z")

</div>

如果我没记错，这个输出位的名称应该是 `welcome-banner-below-input`。你试试看，然后告诉我结果如何！  
我稍后会更新输出位列表。

---

<div class="post-metadata">

**Author:** ![long](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@long](https://meta.discourse.org/u/long)\
**Post date:** [2026年二月20日 21:56 UTC](https://meta.discourse.org/t/banner-featured-links/327497/23 "2026-02-20T21:56:26Z")

</div>

> [@Arkshine](#):
>
> welcome-banner-below-input

太棒了，谢谢！

---

<div class="post-metadata">

**Author:** ![eisammy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eisammy/32/528804_2.png) [@eisammy](https://meta.discourse.org/u/eisammy)\
**Post date:** [2026年三月15日 00:17 UTC](https://meta.discourse.org/t/banner-featured-links/327497/24 "2026-03-15T00:17:55Z")

</div>

I’ve changed this

`import htmlSafe from "discourse/helpers/html-safe";`

to

`import { trustHTML } from "@ember/template";`

Because I noticed for that

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/b/e/9be94587a950c4a2e7469a17f974cae51762c433.png)

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2026年三月15日 01:12 UTC](https://meta.discourse.org/t/banner-featured-links/327497/25 "2026-03-15T01:12:05Z")

</div>

感谢您的报告！我将尽快更新组件。👍

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2026年三月15日 03:25 UTC](https://meta.discourse.org/t/banner-featured-links/327497/27 "2026-03-15T03:25:25Z")

</div>

我更新了这个组件，顺便清理了一些东西 ([DEV: Modernize and clean up by Arkshine · Pull Request #7 · Arkshine/discourse-banner-featured-links · GitHub](https://github.com/Arkshine/discourse-banner-featured-links/pull/7))

更新日志：

- 修复了 `htmlSafe` 弃用
- 修复了一个 SCSS 拼写错误（对于移动端，使用了 `max-width` 而不是 `margin`）
- 修复了一些设置描述
- 将链接上的 `alt` 替换为 `title`（无效的 HTML）
- 将标题渲染为纯文本。  
虽然没有记录允许使用 HTML，但我认为在这种情况下它没有用处。
- 将按钮悬停的默认设置更改为使用与按钮相同的颜色。
- 将 TC 固定到版本 2026.3.0-latest

内部：

- 从 `apiInitializer` 中移除了版本
- 更新了 lint 配置
- 根据新的 lint 配置调整了代码
- 不修改 `settings` 对象
- 进行了一些清理
- 增加了更多测试。

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年四月12日 08:34 UTC](https://meta.discourse.org/t/banner-featured-links/327497/28 "2026-04-12T08:34:18Z")

</div>

有个小问题，按钮也可以放在分类里吗？

谢谢

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2026年四月12日 17:54 UTC](https://meta.discourse.org/t/banner-featured-links/327497/29 "2026-04-12T17:54:32Z")

</div>

您的意思是在特定分类页面上显示它们吗？我认为默认情况下已经显示了，但这取决于“插件出口”设置。

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年四月12日 18:08 UTC](https://meta.discourse.org/t/banner-featured-links/327497/30 "2026-04-12T18:08:19Z")

</div>

哦，好的，需要使用 outlet 插件！

因为目前它只显示在我的主页上，但我希望它在所有页面上都显示。

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2026年四月12日 18:12 UTC](https://meta.discourse.org/t/banner-featured-links/327497/31 "2026-04-12T18:12:21Z")

</div>

您可以使用默认的出口 `above-main-container`，它应该会显示在每一页上。

> [@Arkshine](#):
>
> ℹ 我建议使用 [开发者工具栏](https://meta.discourse.org/t/introducing-discourse-developer-toolbar/346215) 主题组件来查看插件出口的位置！

如果您在查看他人的布局，这会很有用。

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年四月12日 18:17 UTC](https://meta.discourse.org/t/banner-featured-links/327497/32 "2026-04-12T18:17:39Z")

</div>

我正好在设置 above-main-container 参数，但只在首页看到它。

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2026年四月12日 18:23 UTC](https://meta.discourse.org/t/banner-featured-links/327497/33 "2026-04-12T18:23:07Z")

</div>

你修改了 `url must contain` 吗？

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/c/0/ec03c54362d551cb11be304d40c2c575ea335305.png)

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年四月12日 18:45 UTC](https://meta.discourse.org/t/banner-featured-links/327497/34 "2026-04-12T18:45:23Z")

</div>

不，我没有修改，但我刚学到了一个新东西：rofl

我会去测试一下，谢谢 Arkshine：+1

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年四月14日 15:47 UTC](https://meta.discourse.org/t/banner-featured-links/327497/35 "2026-04-14T15:47:47Z")

</div>

@Arkshine 谢谢，太棒了 👍

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年七月16日 09:27 UTC](https://meta.discourse.org/t/banner-featured-links/327497/36 "2026-07-16T09:27:17Z")

</div>

我注意到该组件始终存在一个异常，我不确定是否只有我遇到这种情况 😅

deprecated.js:54 [THEME 109 ‘Breadcrumb Links’] 弃用通知：文件 ‘theme-109/discourse/connectors/above-main-container/discourse-breadcrumb-links.hbs’ 使用了已弃用的 .hbs 扩展名。请重构它以使用 ‘.gjs’ 扩展名。[deprecation id: discourse.hbs-extension] [info: [Deprecating .hbs file extension in themes and plugins](https://meta.discourse.org/t/398896) ]

| | deprecated | @ | deprecated.js:54 |
| --- | --- | --- | --- |
| | (anonymous) | @ | discourse-breadcrumb-links.hbs:6 |

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2026年七月16日 09:34 UTC](https://meta.discourse.org/t/banner-featured-links/327497/37 "2026-07-16T09:34:00Z")

</div>

> [@gilles](#):
>
> deprecated.js:54 [THEME 109 ‘Breadcrumb Links’]

本主题讨论的是“Banner featured links”（横幅精选链接），但您看到的警告指向的是 [https://meta.discourse.org/t/breadcrumb-links/325372（面包屑链接）。](https://meta.discourse.org/t/breadcrumb-links/325372%EF%BC%88%E9%9D%A2%E5%8C%85%E5%B1%91%E9%93%BE%E6%8E%A5%EF%BC%89%E3%80%82)

---

<div class="post-metadata">

**Author:** ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)\
**Post date:** [2026年七月16日 10:03 UTC](https://meta.discourse.org/t/banner-featured-links/327497/38 "2026-07-16T10:03:40Z")

</div>

哎呀，我在 Meta 上搞错了插件 😅 抱歉，谢谢告知 @Moin

[上一頁](https://meta.discourse.org/t/banner-featured-links/327497.md?page=1)
