2.4 KiB
2.4 KiB
title, sidebar, permalink
title | sidebar | permalink |
---|---|---|
Testing Jekyll environment | home_sidebar | siteinfo.html |
Site
- site.port: {{site.port}}
- site.host: {{site.host}}
- site.url: {{site.url}}
- site.baseurl: {{site.baseurl}}
{% comment %}
Full dump
{{site|inspect}}
{% endcomment %}
Testing links
Link processing in Jekyll
Code | Result |
---|---|
{%raw%}[Normal link to source]{%endraw%}{%raw%}(/pages/merlin6/introduction.md){%endraw%} |
Normal link to source |
{%raw%}[Normal link to result](/merlin6/introduction.html){%endraw%} |
Normal link to result |
{%raw%}[Invalid Escaped link to source]({{"/pages/merlin6/introduction.md"}}){%endraw%} |
Invalid Escaped link to source |
{%raw%}[Escaped link to result]({{"/merlin6/introduction.html"}}){%endraw%} |
Escaped link to result |
{%raw%}[Reference link to source](srcRef){%endraw%} |
Reference link to source |
{%raw%}[Reference link to result](dstRef){%endraw%} |
Reference link to result |
{%raw%}[Liquid Link]({% link pages/merlin6/introduction.md %}){%endraw%} |
[Liquid Link]({% link pages/merlin6/introduction.md %}) |
{%raw%}{%endraw%} |
![]() |
{%raw%}{%endraw%} |
 |
{%raw%}Reference to source: (/pages/merlin6/introduction.md){%endraw%} |
Reference to source: (/pages/merlin6/introduction.md) |
`{%raw%}{{ "/pages/merlin6/introduction.md" | relative_url }}{%endraw%}` |
`{%raw%}{{ "/merlin6/introduction.html" | relative_url }}{%endraw%}` |
Conclusions:
- Markdown links that refer to source files are replaced by the baseurl + permalink
- This happens for both normal links and images
- Workarounds
- Link to permalink directly (for pages/posts)
- Can use
{%raw%}{{"path"}}{%endraw%}
pattern to disable expansion