我看到了这个question关于使用 Markdown 链接到内部内容。如何使用组织模式链接到其他帖子?
我尝试了 markdown 格式,但出现以下错误:
...error:
Error: Unknown tag 'post'
Error: Run jekyll build --trace for more information.
最佳答案
您可以使用 {% post_url 1025-08-26-blog-post-name %}
获取 jekyll 帖子中另一篇博文的相对 URL。 (帖子名称上没有尾随 .html
或 .org
)。
要真正使其成为链接,您需要将其包装在 html 链接中。假设您已将 org-publish 设置设置为编写 HMTL,这可能有点棘手,因为标准 org-mode 链接语法似乎不适用于 jekyll 插入的链接。相反,您可以使用组织模式 HTML 转义将 anchor html 直接插入到您的组织文件中:
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
关于emacs - Jekyll 中使用 Org 模式的内部链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32236075/