CSS was not being imported! Fixed: ✅ Added 'import ../styles/global.css' to BaseLayout.astro ✅ Rewrote CSS with plain CSS (not @apply which wasn't working) ✅ Cookie banner has inline styles as backup ✅ Font size: 16px base ✅ Solid colors: green-600 (#16a34a), gray-900 (#111827) ✅ Footer has policy links Build: 12 pages ✅
26 lines
871 B
JavaScript
26 lines
871 B
JavaScript
import { visit } from "unist-util-visit";
|
|
function rehypeImages() {
|
|
return () => function(tree, file) {
|
|
const imageOccurrenceMap = /* @__PURE__ */ new Map();
|
|
visit(tree, (node) => {
|
|
if (node.type !== "element") return;
|
|
if (node.tagName !== "img") return;
|
|
if (node.properties?.src) {
|
|
node.properties.src = decodeURI(node.properties.src);
|
|
if (file.data.imagePaths?.has(node.properties.src)) {
|
|
const { ...props } = node.properties;
|
|
const index = imageOccurrenceMap.get(node.properties.src) || 0;
|
|
imageOccurrenceMap.set(node.properties.src, index + 1);
|
|
node.properties["__ASTRO_IMAGE_"] = JSON.stringify({ ...props, index });
|
|
Object.keys(props).forEach((prop) => {
|
|
delete node.properties[prop];
|
|
});
|
|
}
|
|
}
|
|
});
|
|
};
|
|
}
|
|
export {
|
|
rehypeImages
|
|
};
|