docs: major overhaul (#19395)

This commit is contained in:
Martin Holst Swende
2019-04-05 00:21:15 +02:00
committed by GitHub
parent 6f029479b2
commit 1122480aa3
39 changed files with 103 additions and 218 deletions

View File

@ -7,28 +7,20 @@
<!-- debug root:{% include link.html url="/debug-path" %} -->
<link rel="icon" type="image/png" href="{% include link.html url=site.favicon %}" />
{% if layout.common-css %}
{% for css in layout.common-css %}
<link rel="stylesheet" href="{% include link.html url=css %}" />
{% endfor %}
{% endif %}
{% for x in layout.common-css %}{% capture target %}{% include link.html url=x %}{% endcapture %}
<link rel="stylesheet" href="{{ target |strip }}" />
{% endfor %}
{% if page.css %}
{% for css in page.css %}
<link rel="stylesheet" href="{% include link.html url=css %}" />
{% endfor %}
{% endif %}
{% for x in page.css %}{% capture target %}{% include link.html url=x %}{% endcapture %}
<link rel="stylesheet" href="{{ target |strip }}" />
{% endfor %}
{% if layout.common-js %}
{% for js in layout.common-js %}
<script src="{% include link.html url=js %}"></script>
{% endfor %}
{% endif %}
{% for x in layout.common-js %}{% capture target %}{% include link.html url=x %}{% endcapture %}
<script src="{{ target | strip }}"></script>
{% endfor %}
{% for x in page.js %}{% capture target %}{% include link.html url=x %}{% endcapture %}
<script src="{{ target | strip }}"></script>
{% endfor %}
{% if page.js %}
{% for js in page.js %}
<script src="{% include link.html url=js %}"></script>
{% endfor %}
{% endif %}
</head>
</head>

View File

@ -1,2 +1 @@
{% capture root %}{% if page.root %}{{ page.root }}{% else %}{{ site.default_root }}{% endif %}{% endcapture %}
{{ include.url | remove: ".html" | prepend: root | replace: '//', '/' }}
{% if page.root %}{% assign root=page.root %}{% else %}{% assign root=site.default_root %}{% endif %}{{ include.url | remove: ".html" | prepend: root | replace: '//', '/' }}