# 有主题“地图”吗？（一种查找插件入口等的简便方法）

**URL:** <https://meta.discourse.org/t/is-there-a-theming-map-an-easy-way-to-find-plugin-outlets-etc/139383>\
**Category:** Development\
**Created:** [2020 年1 月 22 日 05:17 UTC](https://meta.discourse.org/t/is-there-a-theming-map-an-easy-way-to-find-plugin-outlets-etc/139383 "2020-01-22T05:17:53Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2020 年1 月 22 日 14:41 UTC](https://meta.discourse.org/t/is-there-a-theming-map-an-easy-way-to-find-plugin-outlets-etc/139383/5 "2020-01-22T14:41:58Z")

</div>

> [@merefield](#):
>
> 源代码永远是您的朋友。浏览 discourse/discourse 的 GitHub 目录结构，您就能找到应用程序各个部分的布局。

是的，完全正确。我构建主题的时间几乎和 Discourse 存在的时间一样长，并且我一直在单独的窗口中参考源代码。

对于模板，您通常需要查看这里：[https://github.com/discourse/discourse/tree/master/app/assets/javascripts/discourse/templates](https://github.com/discourse/discourse/tree/master/app/assets/javascripts/discourse/templates)

对于小部件，则查看这里：[https://github.com/discourse/discourse/tree/master/app/assets/javascripts/discourse/widgets。](https://github.com/discourse/discourse/tree/master/app/assets/javascripts/discourse/widgets%E3%80%82)

有时模板的位置并不一目了然，因为它可能是一个嵌套在其他模板中的组件……如果我想不起来，我最终会搜索源代码中特定的标记片段……

例如，如果我想在“关于”页面添加一些内容……我可以看到“关于”页面的主体有一个唯一的类 `about-page`，所以我会开始搜索 `about` 和 `body-page`（这是页面上的另一个类）。

回答您的一些问题：

> [@AstonJ](#):
>
> 显示主题页面（即查看主题时）的 HTML 的 `<head>` 中的 `<title>` 标签。我需要确保更改对机器人和人类都可见。

我_认为_这需要插件，这超出了我的专业范围……也许其他人能提供更多帮助

> [@AstonJ](#):
>
> 显示分类框时的标记（在任何显示它们的地方）

不同的页面布局有不同的模板，但假设您指的是“包含……的框”布局之一

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs)

> [@AstonJ](#):
>
> 关于页面（在哪里更改管理员和版主板块中的内容）

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/about.hbs](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/about.hbs)

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-theming-map-an-easy-way-to-find-plugin-outlets-etc/139383)._
