397b7145cc
* Add prism and skeleton www page This adds a Prism plugin, a Prism component, and the skeleton of our www site (just for testing the Prism component at the moment). * Remove debugging
16 lines
No EOL
323 B
Text
16 lines
No EOL
323 B
Text
---
|
|
import Prism from 'prismjs';
|
|
import { addAstro } from './index.mjs';
|
|
|
|
addAstro(Prism);
|
|
|
|
export let lang;
|
|
export let code;
|
|
|
|
const grammar = Prism.languages[lang];
|
|
let html = Prism.highlight(code, grammar, lang);
|
|
|
|
let className = `language-${lang}`;
|
|
---
|
|
|
|
<pre class={className}><code class={className}>{html}</code></pre> |