# Discourse 内的锚点链接不起作用 - 但从主题外部可以

**URL:** https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748
**Category:** Bug
**Created:** [2026年三月5日 15:03 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748 "2026-03-05T15:03:53Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![AlexVoss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexvoss/32/546169_2.png) [@AlexVoss](https://meta.discourse.org/u/AlexVoss)
#### Post date: [2026年三月5日 15:03 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/1 "2026-03-05T15:03:53Z")

</div>

您好，

我在帖子中创建指向标题的深度链接时遇到了问题。在新的浏览器标签页或窗口中打开它们时可以正常工作，但在帖子本身或回复中则不行。点击它们时，我会被带到页面顶部。

为了帮助重现此问题，我在 [try.discourse.org](https://try.discourse.org/t/anchor-links-not-working/1499) 上创建了一个[示例主题](https://try.discourse.org/t/anchor-links-not-working/1499)——但我意识到这将在几小时后消失，所以稍后会尝试在这里重现这个问题。

## 我查阅了什么

我搜索了以前提到此问题的帖子，只找到了 [Linking to a heading within a post or topic](https://meta.discourse.org/t/linking-to-a-heading-within-a-post-or-topic/47552) 指南中[这条回复](https://meta.discourse.org/t/linking-to-a-heading-within-a-post-or-topic/47552/57)，它似乎指向同样的问题。它相对较新（2025 年 11 月）。

---

_[View the full topic](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748)._
