# 为模板和JS API 现代化内联脚本标签

**URL:** https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482
**Category:** Development
**Tags:** dev-news
**Created:** [2025 年5 月 19 日 09:55 UTC](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482 "2025-05-19T09:55:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jimkleiber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimkleiber/32/121814_2.png) [@jimkleiber](https://meta.discourse.org/u/jimkleiber)
#### Post date: [2025 年6 月 28 日 11:44 UTC](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482/2 "2025-06-28T11:44:16Z")

</div>

也许是个非常愚蠢的问题，但我有一个非常非常简单的自定义组件，我直接将其放入管理控制台的 `\u003chead\u003e` 下：

```js
<script type="text/x-handlebars" data-template-name="/connectors/top-notices/whos-online-below-site-header">
{{whos-online}}
</script>

```

如果我正确理解了这篇文章，是否意味着我现在必须创建一个单独的自定义组件文件夹，将其托管在 GitHub 上，然后仅仅为了将内容添加到插件出口而添加该组件？

我当然希望不是这样，因为这会破坏我大部分简单的自定义组件 😬

---

_[View the full topic](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482)._
