diff --git a/astro.config.mjs b/astro.config.mjs index f7982f6..e1b528a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -17,6 +17,11 @@ export default defineConfig({ }, markdown: { rehypePlugins: [rehypeSlug], - shikiConfig: { theme: 'github-light' }, + shikiConfig: { + theme: 'github-light', + // ```small — plain text, rendered at a smaller size (see PostLayout's + // `pre[data-language="small"]` rule). Useful for wide terminal traces. + langAlias: { small: 'text' }, + }, }, }); diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro index a89f586..35e9068 100644 --- a/src/layouts/PostLayout.astro +++ b/src/layouts/PostLayout.astro @@ -94,6 +94,10 @@ if (!isHtml) { padding: 12px; overflow-x: auto; } + /* ```small — plain-text blocks set a size down, so wide terminal traces + fit the column without wrapping or horizontal scrolling. */ + .prose-body pre[data-language="small"] { font-size: 0.7em; line-height: 1.5; } + .prose-body pre[data-language="small"] code { font-size: 1em; } /* Inside a block, the
already carries the chip treatment. */
.prose-body pre code {
color: inherit;