terminal-style code window with copy button.
npx jprot init --portfolio
npm start
Install
From your site folder, run:
jprot add CodeBlockThat downloads the self-contained component into theme/components/CodeBlock.js,
where it is picked up automatically — the same way as any built-in component.
To remove it later, just delete that file.
Use it as a homepage section
Add an entry to the sections: list in jprot.config.js:
sections: [
{ component: 'CodeBlock', title: 'CodeBlock' },
]Use it inside a page
On its own line in any Markdown file, passing the props:
:::CodeBlock code="npx jprot init --portfolio\nnpm start" lang="shell" title="setup"Props
| Prop | Type | Note |
|---|---|---|
code | string | code text (\\n for newlines) |
lang | string | small language label |
title | string | window title ('' hides bar) |