Tweak base URL system
This commit is contained in:
parent
870e07ee8f
commit
377d676080
|
@ -1,7 +1,3 @@
|
||||||
<!-- _includes/base.html -->
|
{% capture lvl %}{{ page.url | append:'index.html' | split:'/' | size }}{% endcapture %}
|
||||||
{% assign base = '' %}
|
{% capture base %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
|
||||||
{% assign depth = page.url | split: '/' | size | minus: 1 %}
|
<!-- {{ base }} -->
|
||||||
{% if depth <= 1 %}{% assign base = '.' %}
|
|
||||||
{% elsif depth == 2 %}{% assign base = '..' %}
|
|
||||||
{% elsif depth == 3 %}{% assign base = '../..' %}
|
|
||||||
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{base}}/css/main.css">
|
<link rel="stylesheet" href="{{base}}css/main.css">
|
||||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: base}}">
|
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: base}}">
|
||||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{base}}feed.xml" />
|
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{base}}feed.xml" />
|
||||||
</head>
|
</head>
|
||||||
|
|
2
index.md
2
index.md
|
@ -79,4 +79,4 @@ The following keys have been deprecated for one reason or another. Please don't
|
||||||
[sshkey_signed]:graffen-ssh-key.txt.asc
|
[sshkey_signed]:graffen-ssh-key.txt.asc
|
||||||
[bitcointrezor]:https://bitcointrezor.com
|
[bitcointrezor]:https://bitcointrezor.com
|
||||||
[transitionnotice]:transition-notice.html
|
[transitionnotice]:transition-notice.html
|
||||||
[keysigningpolicy]:keysigning/policy/
|
[keysigningpolicy]:keysigning/policy/index.html
|
||||||
|
|
Loading…
Reference in a new issue