mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Move toc_aside out of <main>
This way, we avoid that the table of contents is picked for link previews by third-party sites.
This commit is contained in:
@@ -32,7 +32,10 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div>
|
||||
{% block toc_aside %}{% endblock toc_aside %}
|
||||
<main>{% block main %}{% endblock main %}</main>
|
||||
</div>
|
||||
|
||||
<div>{% block after_main %}{% endblock after_main %}</div>
|
||||
|
||||
|
||||
@@ -15,14 +15,8 @@
|
||||
{{ page.summary | safe | striptags | truncate(length=150) }}
|
||||
{%- endblock description %}
|
||||
|
||||
{% block main %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
||||
{{ page.date | date(format="%b %d, %Y") }}
|
||||
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
|
||||
</time>
|
||||
|
||||
<aside id="toc-aside">
|
||||
{% block toc_aside %}
|
||||
<aside id="toc-aside">
|
||||
<h2>Table of Contents</h2>
|
||||
<ol>
|
||||
{% for h2 in page.toc %}<li>
|
||||
@@ -35,7 +29,15 @@
|
||||
</li>{% endfor %}
|
||||
<li class="toc-comments-link"><a href="#comments">Comments</a></li>
|
||||
</ol>
|
||||
</aside>
|
||||
</aside>
|
||||
{% endblock toc_aside %}
|
||||
|
||||
{% block main %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
||||
{{ page.date | date(format="%b %d, %Y") }}
|
||||
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
|
||||
</time>
|
||||
|
||||
{% if page.extra.warning %}
|
||||
<div class="warning">
|
||||
@@ -101,4 +103,4 @@
|
||||
{%- endif %}
|
||||
</aside>
|
||||
|
||||
{% endblock after_main %}
|
||||
{% endblock main %}
|
||||
|
||||
Reference in New Issue
Block a user