Last active
October 21, 2015 17:22
-
-
Save marcospinello/55399ac916c8503a655c to your computer and use it in GitHub Desktop.
Programmatically handle relative links in Jekyll using Liquid templating syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
source: http://stackoverflow.com/questions/4629675/jekyll-markdown-internal-links | |
code snippet author: http://stackoverflow.com/users/399105/bmaupin | |
{% endcomment %} | |
{% for page in site.pages %} | |
{% if page.url == '/path/to/page.html' %} | |
[{{ page.title }}]({{ page.url }}) | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment