# Data-theme-toc="true" 应放在帖子的开头，并独占一段

**URL:** <https://meta.discourse.org/t/data-theme-toc-true-should-be-placed-at-the-top-of-a-post-in-its-own-paragraph/407863>\
**Category:** Feature\
**Tags:** composer, disco-toc\
**Created:** [2026年七月17日 07:13 UTC](https://meta.discourse.org/t/data-theme-toc-true-should-be-placed-at-the-top-of-a-post-in-its-own-paragraph/407863 "2026-07-17T07:13:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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年七月17日 07:50 UTC](https://meta.discourse.org/t/data-theme-toc-true-should-be-placed-at-the-top-of-a-post-in-its-own-paragraph/407863/3 "2026-07-17T07:50:45Z")

</div>

我通常将 `<div data-theme-toc="true"> </div>` 放在帖子的最后一行。这样下方就不会有任何内容，避免看起来奇怪。[Exploring TOC Issues](https://meta.discourse.org/t/exploring-toc-issues/276757)

---

_[View the full topic](https://meta.discourse.org/t/data-theme-toc-true-should-be-placed-at-the-top-of-a-post-in-its-own-paragraph/407863)._
