_includes: base.html: remove comments & head.html: refer to css with {{base}}

This commit is contained in:
Aminda Suomalainen 2019-08-08 20:04:35 +03:00
parent 85201505fc
commit 1e7c02fed7
No known key found for this signature in database
GPG Key ID: 0C207F07B2F32B67
2 changed files with 2 additions and 7 deletions

View File

@ -1,11 +1,5 @@
<!-- 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. -->

View File

@ -1,3 +1,4 @@
{%- include base.html -%}
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -11,7 +12,7 @@
<link rel="openid.delegate" href="https://mikaela.info/" />
<link rel="openid.server" href="https://openid.indieauth.com/openid" />
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "{{base}}/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/blog/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} - in English" href="{{ "/blog/feed.en.xml" | prepend: site.baseurl | prepend: site.url }}" />