Skip to content

Commit 3af49c1

Browse files
committed
Allow site to keep h2 headers via page.keeph2
1 parent 0815dc4 commit 3af49c1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ country_code : CA
2323
dirdownloads: downloads
2424
dircontent: _sections
2525
previousrun: _data/previousrun.yml
26+
keeph2: true
2627

2728
# content
2829
collections:

_layouts/section.html

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@
2323
<img src="web/{{ page.image }}.jpg"/>
2424
{% if next %}</a>{% endif %}
2525
</div>
26+
<h2>Transcription</h2>
2627
{% endif %}
28+
{% if site.keeph2 || page.keeph2 %}
29+
{{ content }}
30+
{% else %}
2731
<!--
2832
This is where we make changes to the html output of the markdown
2933
transformation before it is inserted into the page.
3034
3135
In this case we want to remove the first h2 header, since the chapter
3236
title is displayed in the jumbotron div.
3337
-->
34-
{{ content
35-
| replace_regex: '<h2.*</h2>', '', true
36-
}}
38+
{{ content
39+
| replace_regex: '<h2.*</h2>', '', true
40+
}}
41+
{% endif %}
3742
</article>
3843

3944
</div>

0 commit comments

Comments
 (0)