Azure DevOps Wiki:如何在页面内链接?

Fra*_*hop 7 azure-devops azure-devops-wiki

在我的 DevOps Wiki 中,我有一个页面,想要创建一个包含文章链接的索引。主要是我找到了这个手册来做到这一点:learn.microsoft.com... 但我没有让它工作。

如何在 Wiki 页面内建立链接?你能举个例子吗?

我想我必须为标题设置一个锚点并链接到锚点的索引项?!

这里有一个例子:

Index
1.First article
2.Second article

#1.First article
bla bla bla ...

#2.Second article
bla bla bla ...
and a image
Run Code Online (Sandbox Code Playgroud)

Sco*_*ker 6

我怀疑您遇到了一些命名问题。回复:“我有一个页面,想要创建一个包含文章链接的索引

  1. 通常“页面”和“文章”是同义词。据我所知,当您说“文章”时,您指的是同一页面/文章的子部分。页面/文章的小节由您和您对标题的使用来描述。
  2. 当您说“索引”时,我想您指的是目录(TOC)提供的结果。如果您想要比目录提供的更多控制,您可以构建自己的链接“索引”,仅指向您选择的标题,例如此示例页面:
# My Index
1. [First Index Item, H1](#heading1).
1. [Second Index Item, H2.1](#heading2.1).
1. [Third Index Item, H4](#heading4).
1. [A heading with spaces](#heading-with-spaces)

# Heading1
Add a bunch of filler here to space out the page so you can see the result of selecting your '_Index_" items ([My Index](#my-index) above).

# Heading2
Add a bunch of filler here to space out the page.

## Heading2.1
Add a bunch of filler here to space out the page.

# Heading3
Add a bunch of filler here to space out the page.

# Heading4
Add a bunch of filler here to space out the page.

# Heading with Spaces
Add a bunch of filler here to space out the page.
Run Code Online (Sandbox Code Playgroud)

  • 另请注意,您可以检索任何标题的链接。查看页面时(不是在编辑模式下)将鼠标放在与您想要链接的标题相同的行上。代表两个链节的图标将出现在标题的右侧。单击它,您的浏览器 URL 将包含完整链接,以“?anchor=<您的标题链接>”结尾。将其转换为“#<your header link>”,您可以在 Wiki 页面中使用它来导航到特定页面的标题部分。 (5认同)
  • 正确的。因此,我在示例中避免使用空格。但是,使用 Azure DevOps Wiki,您只需用破折号“-”替换空格即可。例如,对于您的 makrdown `#My header`,其链接是“#my-header”。 (2认同)