full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -1,15 +1,9 @@
---
import type { ThemePresets } from '@astrojs/markdown-remark';
import type {
BuiltinLanguage,
LanguageRegistration,
ShikiTransformer,
SpecialLanguage,
ThemeRegistration,
ThemeRegistrationRaw,
} from 'shiki';
import type { ShikiTransformer, ThemeRegistration, ThemeRegistrationRaw } from 'shiki';
import { bundledLanguages } from 'shiki/langs';
import { getCachedHighlighter } from '../dist/core/shiki.js';
import type { CodeLanguage } from '../dist/types/public';
import type { HTMLAttributes } from '../types';
interface Props extends Omit<HTMLAttributes<'pre'>, 'lang'> {
@@ -22,7 +16,7 @@ interface Props extends Omit<HTMLAttributes<'pre'>, 'lang'> {
*
* @default "plaintext"
*/
lang?: BuiltinLanguage | SpecialLanguage | LanguageRegistration;
lang?: CodeLanguage;
/**
* A metastring to pass to the highlighter.
* Allows passing information to transformers: https://shiki.style/guide/transformers#meta
@@ -111,13 +105,13 @@ const highlighter = await getCachedHighlighter({
],
theme,
themes,
defaultColor,
wrap,
transformers,
});
const html = await highlighter.highlight(code, typeof lang === 'string' ? lang : lang.name, {
const html = await highlighter.codeToHtml(code, typeof lang === 'string' ? lang : lang.name, {
defaultColor,
wrap,
inline,
transformers,
meta,
attributes: rest as any,
});