4040 </ symbol >
4141 </ svg >
4242
43+ < div class ="site-container ">
4344 < div class ="side-bar ">
4445 < div class ="site-header ">
4546 < a href ="{{ '/' | absolute_url }} " class ="site-title lh-tight "> {% include title.html %}</ a >
9293 </ nav >
9394 {% endif %}
9495 {% endunless %}
95- < div id ="main-content " class ="main-content " role ="main ">
96+
97+ {% comment %} Capture the rendered content for TOC extraction {% endcomment %}
98+ {% capture rendered_content %}
9699 {% if site.heading_anchors != false %}
97100 {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="< svg viewBox =\ "0 0 16 16\" aria-hidden=\"true\"> < use xlink:href =\ "#svg-link\"> </ use > </ svg > " anchorClass="anchor-heading" %}
98101 {% else %}
99102 {{ content }}
100103 {% endif %}
104+ {% endcapture %}
101105
102- {% if page.has_children == true and page.has_toc != false %}
103- < hr >
104- < h2 class ="text-delta "> Table of contents</ h2 >
105- < ul >
106- {%- assign children_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
107- {% for child in children_list %}
108- < li >
109- < a href ="{{ child.url | absolute_url }} "> {{ child.title }}</ a > {% if child.summary %} - {{ child.summary }}{% endif %}
110- </ li >
111- {% endfor %}
112- </ ul >
113- {% endif %}
106+ < div class ="content-with-toc ">
107+ < div id ="main-content " class ="main-content " role ="main ">
108+ {{ rendered_content }}
114109
115- {% if site.footer_content != nil or site.last_edit_timestamp or site.gh_edit_link %}
116- < hr >
117- < footer >
118- {% if site.back_to_top %}
119- < p > < a href ="#top " id ="back-to-top "> {{ site.back_to_top_text }}</ a > </ p >
120- {% endif %}
121- {% if site.footer_content != nil %}
122- < p class ="text-small text-grey-dk-000 mb-0 "> {{ site.footer_content }}</ p >
123- {% endif %}
124-
125- {% if site.last_edit_timestamp or site.gh_edit_link %}
126- < div class ="d-flex mt-2 ">
127- {% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_at %}
128- < p class ="text-small text-grey-dk-000 mb-0 mr-2 ">
129- Page last modified: < span class ="d-inline-block "> {{ page.last_modified_at | date: site.last_edit_time_format }}</ span > .
130- </ p >
131- {% endif %}
132- {% if
133- site.gh_edit_link and
134- site.gh_edit_link_text and
135- site.gh_edit_repository and
136- site.gh_edit_branch and
137- site.gh_edit_view_mode
138- %}
139- < p class ="text-small text-grey-dk-000 mb-0 ">
140- < a href ="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}/{{ page.path }} " id ="edit-this-page "> {{ site.gh_edit_link_text }}</ a >
141- </ p >
142- {% endif %}
143- </ div >
144- {% endif %}
145- </ footer >
146- {% endif %}
110+ {% if page.has_children == true and page.has_toc != false %}
111+ < hr >
112+ < h2 class ="text-delta "> Table of contents</ h2 >
113+ < ul >
114+ {%- assign children_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
115+ {% for child in children_list %}
116+ < li >
117+ < a href ="{{ child.url | absolute_url }} "> {{ child.title }}</ a > {% if child.summary %} - {{ child.summary }}{% endif %}
118+ </ li >
119+ {% endfor %}
120+ </ ul >
121+ {% endif %}
122+
123+ {% if site.footer_content != nil or site.last_edit_timestamp or site.gh_edit_link %}
124+ < hr >
125+ < footer >
126+ {% if site.back_to_top %}
127+ < p > < a href ="#top " id ="back-to-top "> {{ site.back_to_top_text }}</ a > </ p >
128+ {% endif %}
129+ {% if site.footer_content != nil %}
130+ < p class ="text-small text-grey-dk-000 mb-0 "> {{ site.footer_content }}</ p >
131+ {% endif %}
132+
133+ {% if site.last_edit_timestamp or site.gh_edit_link %}
134+ < div class ="d-flex mt-2 ">
135+ {% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_at %}
136+ < p class ="text-small text-grey-dk-000 mb-0 mr-2 ">
137+ Page last modified: < span class ="d-inline-block "> {{ page.last_modified_at | date: site.last_edit_time_format }}</ span > .
138+ </ p >
139+ {% endif %}
140+ {% if
141+ site.gh_edit_link and
142+ site.gh_edit_link_text and
143+ site.gh_edit_repository and
144+ site.gh_edit_branch and
145+ site.gh_edit_view_mode
146+ %}
147+ < p class ="text-small text-grey-dk-000 mb-0 ">
148+ < a href ="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}/{{ page.path }} " id ="edit-this-page "> {{ site.gh_edit_link_text }}</ a >
149+ </ p >
150+ {% endif %}
151+ </ div >
152+ {% endif %}
153+ </ footer >
154+ {% endif %}
155+
156+ </ div >
147157
158+ < aside class ="toc-sidebar ">
159+ {% include toc.html content=rendered_content %}
160+ </ aside >
148161 </ div >
149162 </ div >
150163
@@ -158,6 +171,7 @@ <h2 class="text-delta">Table of contents</h2>
158171 < div class ="search-overlay "> </ div >
159172 {% endif %}
160173 </ div >
174+ </ div > <!-- .site-container -->
161175
162176 < link href ="/assets/css/syntax.css " rel ="stylesheet " type ="text/css " />
163177 < link href ="/assets/css/search.css " rel ="stylesheet " type ="text/css " />
0 commit comments