diff --git a/book/HypermediaSystems.adoc b/book/HypermediaSystems.adoc
index bb139f4..843b7e9 100644
--- a/book/HypermediaSystems.adoc
+++ b/book/HypermediaSystems.adoc
@@ -1,5 +1,5 @@
-= Hypermedia Systems
+= [.allcaps.big]#Hypermedia Systems#
Adam Stepinski, Carson Gross, Deniz Akşimşek
:doctype: book
:title-page:
@@ -7,11 +7,12 @@ Adam Stepinski, Carson Gross, Deniz Akşimşek
:toclevels: 2
:toc-title!:
:imagesdir: images
-:sectnums:
-:sectnumlevels: 2
-:showtitle:
+:partnums:
+:sectnums: all
+:sectnumlevels: 4
:layout: chapter.njk
:url: ./hypermedia-systems/
+:is_whole_book: 1
ifdef::hypermedia-systems-pdf[]
[.toc-container]
diff --git a/www/_includes/chapter.njk b/www/_includes/chapter.njk
index 9ebb522..f4becc0 100644
--- a/www/_includes/chapter.njk
+++ b/www/_includes/chapter.njk
@@ -42,17 +42,22 @@ layout: layout.njk
Contents
- {% macro toc(block) %}
-
- {% for sect in block.getSections() %}
- -
- {{ sect.getTitle() | safe }}
- {{ toc(sect) if sect.getSections().length > 0 }}
-
- {% endfor %}
-
+ {% macro toc(block, level=0) %}
+ {% set isPart = level == 0 and is_whole_book %}
+ {% set isChapter = level == 1 and is_whole_book %}
+
{% endmacro %}
- {{ asciidoc and toc(asciidoc) }}
+ {{ asciidoc and toc(asciidoc, 0) }}
{% endif %}
diff --git a/www/_plugins/postprocess-asciidoc.ts b/www/_plugins/postprocess-asciidoc.ts
index 9bdd130..042521d 100644
--- a/www/_plugins/postprocess-asciidoc.ts
+++ b/www/_plugins/postprocess-asciidoc.ts
@@ -7,6 +7,11 @@ export default () => {
const document = page.document;
if (!document) return;
+ $$(document, ".sect0").forEach((el) => {
+ const [num, ...title] = el.innerHTML.split(":");
+ el.innerHTML = `Part ${num}: ${title.join(":")}`
+ });
+
$$(document, ".listingblock, .imageblock").forEach((el) => {
el.tagName = "figure";
el.classList.add("contents"); // Don't draw box around images and code listings