mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2024-11-22 20:19:32 +01:00
_includes: add Cloudflare's base.html
This commit is contained in:
parent
caac604cdd
commit
85201505fc
11
_includes/base.html
Normal file
11
_includes/base.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<!-- Cloudflare recommends these for IPFS at https://developers.cloudflare.com/distributed-web/ipfs-gateway/updating-for-ipfs/ -->
|
||||||
|
|
||||||
|
{% assign depth = page.url | split: '/' | size | minus: 1 %}
|
||||||
|
{% if depth <= 1 %}{% assign base = '.' %}
|
||||||
|
{% elsif depth == 2 %}{% assign base = '..' %}
|
||||||
|
{% elsif depth == 3 %}{% assign base = '../..' %}
|
||||||
|
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
|
||||||
|
|
||||||
|
<!-- if anything has to link to root, it should use `{%- include base.html -%}`
|
||||||
|
and normal `/css/main.css` etc. should become `{{base}}/css/main.css`
|
||||||
|
says the page above. base.html ends here. -->
|
Loading…
Reference in New Issue
Block a user