diff --git a/site/src/routes/docs/_GuideContents.svelte b/site/src/routes/docs/_GuideContents.svelte
index bbee664895..3b488e1ffa 100644
--- a/site/src/routes/docs/_GuideContents.svelte
+++ b/site/src/routes/docs/_GuideContents.svelte
@@ -106,6 +106,10 @@
opacity: 1
}
+ .subsection[data-level="4"] {
+ padding-left: 1em;
+ }
+
.active {
opacity: 1;
/* font-weight: 700; */
@@ -138,7 +142,12 @@
{#each section.subsections as subsection}
-
+
{subsection.title}
{#if subsection.slug === active_section}
@@ -150,4 +159,4 @@
{/each}
{/each}
-
\ No newline at end of file
+
diff --git a/site/src/routes/docs/_sections.js b/site/src/routes/docs/_sections.js
index 9a30845854..a465851f86 100644
--- a/site/src/routes/docs/_sections.js
+++ b/site/src/routes/docs/_sections.js
@@ -109,7 +109,7 @@ export default function() {
if (seen.has(slug)) throw new Error(`Duplicate slug ${slug}`);
seen.add(slug);
- if (level === 3) {
+ if (level === 3 || level === 4) {
const title = unescape(
text
.replace(/<\/?code>/g, '')
@@ -120,12 +120,12 @@ export default function() {
})
);
- subsections.push({ slug, title });
+ subsections.push({ slug, title, level });
}
return `
- 3 ? 'data-scrollignore' : ''}>
+
${text}
`;
diff --git a/site/src/routes/docs/index.svelte b/site/src/routes/docs/index.svelte
index 2ad23be234..d7055787ff 100644
--- a/site/src/routes/docs/index.svelte
+++ b/site/src/routes/docs/index.svelte
@@ -18,8 +18,7 @@
let show_contents = false;
onMount(() => {
- // don't update `active_section` for headings below level 3, see _sections.js
- const anchors = container.querySelectorAll('[id]:not([data-scrollignore])');
+ const anchors = container.querySelectorAll('[id]');
let positions;