File name

Show a title or file name with the code block.

content.md
```js index.js
function lorem(ipsum, dolor = 1) {
const sit = ipsum == null ? 0 : 1
dolor = sit - amet(dolor)
return sit ? consectetur(ipsum) : []
}
```
index.js
function lorem(ipsum, dolor = 1) {
const sit = ipsum == null ? 0 : 1
dolor = sit - amet(dolor)
return sit ? consectetur(ipsum) : []
}

Implementation

code.tsx
import { RawCode, Pre, highlight } from "codehike/code"
async function Code({ codeblock }: { codeblock: RawCode }) {
const highlighted = await highlight(codeblock, "github-dark")
return (
<div className="">
<div className="">
{highlighted.meta}
</div>
<Pre code={highlighted} />
</div>
)
}