有没有办法在 jekyll 中获取 markdown post 的完整路径?

Is there a way to get the full path of the markdown post in jekyll?

我创建了一个博客,仅供个人使用。整理一下自己的笔记。

不像一个真正的博客,在你写完 post 之后你通常就完成了。我会经常编辑这些 post,所以在页脚中我希望有以下内容:

sublime /path/to/_posts/markdown-post.md

以便我将其复制并粘贴到我的终端中。

那么有没有办法动态获取所有这些信息。或者至少是完整的降价文件名(我可以自己硬编码路径)

{{ site.source }} 将为您提供站点根目录的绝对路径。

{{ page.path }} 将为您提供相对于网站根目录的页面路径。

终于 subl {{ site.source }}/{{ page.path }} 成功了。