【问题标题】:Jekyll kramdown does not support reference linksJekyll kramdown 不支持参考链接
【发布时间】:2020-03-08 16:01:08
【问题描述】:

我尝试在 Jekyll 中使用 kramdown reference links。参考链接不起作用(Jekyll 不生成标签)。内联链接按预期工作。

我只是将kramdown syntax reference 中的示例复制到我的 Kramdown 文档中。

This is a [reference style link][linkid] to a page. And [this]
[linkid] is also a link. As is [this][] and [THIS].

请有人重现此问题或确认它正在运行。

【问题讨论】:

    标签: markdown jekyll kramdown


    【解决方案1】:

    您需要定义 reference。 例如:

    This is a [reference style link][linkid] to a page. And [this]
    [linkid] is also a link.
    
    
    [linkid]: http://www.example.com/
    

    【讨论】:

    • 谢谢,现在明白了。我误解了参考链接的含义。实际上我想链接到生成的 HTML 锚。到# This is a heading 我可以链接到[Linktext](#this-is-a-heading)。思想参考链接是一种捷径。
    【解决方案2】:

    我想你想要一个脚注:

    This is a text with a footnote[^1].
    
    [^1]: And here is the definition.
    

    https://kramdown.gettalong.org/quickref.html#footnotes

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多