I'm using GitHub Pages to generate my blog. I would like to place a link on each post to allow viewers to view the MD source andor create a pull request to suggest a modification of that post.
However, I can't find anything describing how to generate such URLs.
I'm thinking something like this:
<a href="{{ post.original.url }}">View Original</a>
Is this possible? And if so, how can I do this?
You can generate a link directly to each page adding a URL like this to your layout, for example for user john and foo-repo: https://github.com/john/foo-repo/edit/master/{{ page.path }}
<a href="https://github.com/john/foo-repo/edit/master/{{ page.path }}" class="text-success">
<i class="fa fa-pencil"></i> Improve this page
</a>
I've used this approach, here is an example: https://github.com/marcanuy/jekyll-skeleton/blob/master/_layouts/default.html and working: https://marcanuy.github.io/jekyll-skeleton/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments