假设我在同一个git hub wiki页面中有两个点,为此我们将调用place 1它place 2.
##Title
###Place 1
Hello, this is some text to fill in this, [here](place2), is a link to the second place.
###Place 2
Place one has the fun times of linking here, but I can also link back [here](place1).
Run Code Online (Sandbox Code Playgroud)
另一种选择是ToC.
##Title
[ToC]
###Place 1
###Place 2
Run Code Online (Sandbox Code Playgroud)
有没有办法做到这一点?注意 - 看到这个,所以我会假设它是关于主题的.此外,它处理文件之间的转换,这个处理在同一文件之间进行.
blu*_*Cat 79
这篇关于Github的工作:
## Title
### Place 1
Hello, this is some text to fill in this, [here](#place-2), is a link to the second place.
### Place 2
Place one has the fun times of linking here, but I can also link back [here](#place-1).
Run Code Online (Sandbox Code Playgroud)
转换规则摘要:
-LivingSocial API设计指南是一个包含大量链接和格式的好示例文档
bca*_*tle 19
如果您有一堆具有相同名称的(子)标题,也可以创建命名自定义锚点.要使用标头插入HTML标记:
<h4 id="login-optional-fields">
Optional Fields
</h4>
Run Code Online (Sandbox Code Playgroud)
然后通过ID属性链接到它:
[see above](#login-optional-fields)
Run Code Online (Sandbox Code Playgroud)
还可以将锚标记直接添加到文档中:
<a id="my-anchor"></a>
Run Code Online (Sandbox Code Playgroud)
复制自 GitHub Gist - 原始帖子位于此处
要创建跳转到自述文件不同部分的锚链接(如交互式目录),首先创建一个标题:
#Real Cool Heading
Run Code Online (Sandbox Code Playgroud)
该标题的锚链接是小写标题名称,其中有空格,带有破折号。您始终可以通过访问 Github.com 上的自述文件并单击将鼠标悬停在标题左侧时出现的锚点来获取锚点名称。复制从 # 开始的所有内容:
#real-cool-heading
Run Code Online (Sandbox Code Playgroud)
无论您想要链接到 Real Cool 标题部分的位置,请将所需的文本放在括号中,然后将锚链接放在括号中:
[Go to Real Cool Heading section](#real-cool-heading)
Run Code Online (Sandbox Code Playgroud)
接受的答案对我不起作用,因为我的标题也是一个链接:
之前(不起作用):
Table of contents
1. [Header Name](#header-name)
### [Header Name](https://google.com)
Run Code Online (Sandbox Code Playgroud)
之后(为我工作):
Table of contents
1. [Header Name](#header-name)
### Header Name
https://google.com
Run Code Online (Sandbox Code Playgroud)
这是当你不想使用 html 并希望使用已接受的解决方案并在自述文件中进行一些权衡时。
| 归档时间: |
|
| 查看次数: |
30837 次 |
| 最近记录: |