Code Blocks
A showcase of code blocks variants.
Usage
With Title
nuxt.config.ts
Highlight Lines
Line Numbers
Fixed Height
Collapse Code
const parsedMeta = computed(() => {
const split = meta?.split(' ') ?? [];
const params = new Map<string, string | undefined>();
for (const param of split) {
const [key, val] = param.split('=');
params.set(key, val);
}
return params;
});
Custom Icon
Custom Icon
Transformers
Remove the \
in the notions to enable the transformers.
e.g. // [\!code --]
to // [!code --]
Diff
Error level
Focus
Inline Code
code inline
const codeInline: string = 'highlighted code inline'