Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将呈现的Jekyll页面的源显示为页面上的链接_Jekyll - Fatal编程技术网

将呈现的Jekyll页面的源显示为页面上的链接

将呈现的Jekyll页面的源显示为页面上的链接,jekyll,Jekyll,假设我们在domain.com/rendered post/上有一篇呈现的Jekyll帖子 帖子的来源位于https://github.com/username/username.github.io/blob/master/_posts/2013-12-10-rendered-post-title.md 在呈现源代码页时,是否可以在文章中自动包含指向源代码页的链接 文章中的最终结果应该是我在布局中使用页面变量{{page.path}}找到了解决方案 <a href="https://git

假设我们在
domain.com/rendered post/
上有一篇呈现的Jekyll帖子

帖子的来源位于
https://github.com/username/username.github.io/blob/master/_posts/2013-12-10-rendered-post-title.md

在呈现源代码页时,是否可以在文章中自动包含指向源代码页的链接


文章中的最终结果应该是

我在布局中使用页面变量
{{page.path}}
找到了解决方案

<a href="https://github.com/username/username.github.io/blob/master/{{ page.path }}">View source code of this page</a>

呈现

<a href='https://github.com/username/username.github.io/blob/master/_posts/2013-12-10-rendered-post-title.md'>View source code of this page</a>