1. Remove duplicate/broken code in product tables section 2. Fix PostCSS config for Tailwind 4 3. Add @tailwindcss/postcss dependency 4. Remove --production flag from Dockerfile (sharp required) All fixes enable successful Docker build with favicon working.
20 lines
587 B
JavaScript
20 lines
587 B
JavaScript
import { runHighlighterWithAstro } from "@astrojs/prism/dist/highlighter";
|
|
import { highlightCodeBlocks } from "./highlight.js";
|
|
const rehypePrism = (excludeLangs) => {
|
|
return async (tree) => {
|
|
await highlightCodeBlocks(
|
|
tree,
|
|
(code, language) => {
|
|
let { html, classLanguage } = runHighlighterWithAstro(language, code);
|
|
return Promise.resolve(
|
|
`<pre class="${classLanguage}" data-language="${language}"><code is:raw class="${classLanguage}">${html}</code></pre>`
|
|
);
|
|
},
|
|
excludeLangs
|
|
);
|
|
};
|
|
};
|
|
export {
|
|
rehypePrism
|
|
};
|