Skip to content

Commit 749800d

Browse files
committed
Update sidebar processing to reflect Atlas changes
Atlas recently decided to go more "semantic" so sidebar headings are now H1s. This should therefore be reflected in our script.
1 parent 651d6b4 commit 749800d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jupyter_book_to_htmlbook/text_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ def process_sidebars(chapter):
7272

7373
if aside.find("p", class_="sidebar-title"):
7474
title = aside.find("p", class_="sidebar-title")
75-
title.name = "h5"
75+
title.name = "h1"
7676

7777
return chapter

tests/test_text_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ def test_sidebar_processing():
9696
</aside>""", "html.parser")
9797
process_sidebars(chapter_text)
9898
assert chapter_text.find("aside")["data-type"] == "sidebar"
99-
assert chapter_text.find("h5").string == "Here Is a Sidebar Title"
99+
assert chapter_text.find("h1").string == "Here Is a Sidebar Title"

0 commit comments

Comments
 (0)