Skip to content

Commit 36c8b05

Browse files
committed
feat: Only add headers from main content in toc sidebar
1 parent a807ef8 commit 36c8b05

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

assets/outline.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
function getHeaders() {
2-
const elements = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
2+
const container = document.getElementById('main_content') || document;
3+
const elements = container.querySelectorAll('h1, h2, h3, h4, h5, h6');
34
const headers = [];
45

56
elements.forEach(el => {

examples.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ These examples can be used to test the capabilities of various wallets.
5151

5252
## The Examples
5353

54-
<!-- managed_by_embed -->
5554
{% for credential in site.credentials %}
5655
- [{{ credential.title }}]({{ credential.url | relative_url }})
5756
{% endfor %}
58-
<!-- /managed_by_embed -->
5957

6058
<div id="tocwrapper">
6159
<strong>Table of Contents</strong>

0 commit comments

Comments
 (0)