emacs - Jekyll 中使用 Org 模式的内部链接

标签 emacs jekyll org-mode

我看到了这个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/

相关文章:

emacs - 当没有可保存的内容时更新选项卡栏

html - Jekyll 包含转义结束标签?

jekyll - 如何将变量从页面传递到 Liquid 中的布局?

apache-flex - 如何开始使用 Emacs + fcsh + Flex3?

emacs - 调试 Lisp & SLIME,错误 "Cannot find source location"

emacs - 如何获取Emacs组织模式完成的统计信息以通过非待办事项标题进行过滤?

emacs - 如何在 emacs 组织模式中启用并行 PDF 导出

emacs - 组织协议(protocol)捕获工作了几个月,然后突然停止,没有任何正确的错误消息

emacs - 如何使用 Emacs 更改主要模式中的指定颜色

ruby - Jekyll 的 pretty-print html 输出