How can a Jekyll page access its filename?

前端 未结 2 1341
耶瑟儿~
耶瑟儿~ 2020-12-15 06:09

My goal is to create links from any published jekyll page back to its location on Github.

And so, I\'d need access to a page\'s pathname when constructing this url.

2条回答
  •  死守一世寂寞
    2020-12-15 06:42

    I'm not sure when this was added, but page.path gives the source file's path relative to the Jekyll root directory.

提交回复
热议问题