-
+
{children}
@@ -55,7 +67,7 @@ export default function DocLayout({
})}
-
+
)
diff --git a/src/components/code/Code.tsx b/src/components/code/Code.tsx
index fee41a4e9..4e0c12ffa 100644
--- a/src/components/code/Code.tsx
+++ b/src/components/code/Code.tsx
@@ -6,9 +6,11 @@ import { highlight } from './highlight'
export async function Code({
codeblock,
+ hideBashPanel,
}: {
codeblock: RawCode
isPanel?: boolean
+ hideBashPanel?: boolean
}) {
const highlighted = await highlight(codeblock)
@@ -18,7 +20,11 @@ export async function Code({
return (
-
+
)
}
diff --git a/src/components/code/Pre.tsx b/src/components/code/Pre.tsx
index 0e7c0c48e..3563e40f9 100644
--- a/src/components/code/Pre.tsx
+++ b/src/components/code/Pre.tsx
@@ -20,11 +20,13 @@ type Props = {
highlighted: HighlightedCode
showPanel?: boolean
className?: string
+ hideBashPanel?: boolean
} & HandlerProps
const Pre: React.FC
= ({
highlighted,
showPanel,
+ hideBashPanel,
enableTransitions,
className,
}) => {
@@ -40,7 +42,7 @@ const Pre: React.FC = ({
const showFileNamePanel = showPanel && !!title
- const isBash = highlighted.lang === 'shellscript'
+ const isBash = highlighted.lang === 'shellscript' && !hideBashPanel
return (
<>
diff --git a/src/components/layout/DocToC.tsx b/src/components/layout/DocToC.tsx
index 83c7b9812..55828d359 100644
--- a/src/components/layout/DocToC.tsx
+++ b/src/components/layout/DocToC.tsx
@@ -1,7 +1,7 @@
'use client'
import type { Doc } from '@/content'
-import { useRef, useLayoutEffect, useState, useEffect } from 'react'
+import { useState, useEffect } from 'react'
import Link from 'next/link'
import { DocTracingBeam } from './DocTracingBeam'
import { Button } from '../ui/button'
@@ -15,7 +15,13 @@ interface Toc {
depth: number
}
-const DocToC = ({ doc }: { doc: Doc }) => {
+const DocToC = ({
+ doc,
+ startSteps,
+}: {
+ doc: Doc
+ startSteps?: React.JSX.Element | undefined
+}) => {
const initial = 14
const sectionSize = 28
const offset = 10
@@ -58,8 +64,8 @@ const DocToC = ({ doc }: { doc: Doc }) => {
}, [])
return (
-
-