【发布时间】:2015-08-26 20:25:39
【问题描述】:
我看到这个question 是关于使用降价链接到内部内容的。如何使用 Org 模式链接到其他帖子?
我尝试了markdown格式,我得到以下错误:
...error:
Error: Unknown tag 'post'
Error: Run jekyll build --trace for more information.
【问题讨论】:
我看到这个question 是关于使用降价链接到内部内容的。如何使用 Org 模式链接到其他帖子?
我尝试了markdown格式,我得到以下错误:
...error:
Error: Unknown tag 'post'
Error: Run jekyll build --trace for more information.
【问题讨论】:
您可以使用{% post_url 1025-08-26-blog-post-name %}(在帖子名称后面不带.html 或.org)在jekyll 帖子中获取另一个博客帖子的相对URL。
要真正使其成为链接,您需要将其包装在 html 链接中。假设您已将 org-publish 设置设置为编写 HMTL,这可能有点棘手,因为标准 org-mode 链接语法似乎不适用于 jekyll 插入的链接。相反,您可以使用 org-mode HTML 转义将锚 html 直接插入到您的 org 文件中:
Blah blah surrounding text
@@html:<a href="{% post_url 1025-08-26-blog-post-name %}">@@Text describing link to my other post@@html:</a>@@ more surrounding text
【讨论】:
<a href="{% post_url 1025-08-26-blog-post-name %}">@@Text describing link to my other post@@html:</a>