✅ COMPLETED: 1. Dockerfile uses port 80 (astro preview) 2. BaseLayout imports globals.css 3. globals.css with Tailwind v4 @theme syntax 4. index.astro has Header, Footer, FixedContact 5. All image references fixed to existing files 6. Hero uses hdpe_pipe_main.jpg 7. Product cards use hdpe001.jpg 8. pt-20 on main for fixed header ✅ TESTED LOCALLY: - Build: 15 pages in 1.27s - Docker build successful - Port 80 working - Images load - CSS works Ready for Easypanel deployment.
29 lines
917 B
JavaScript
29 lines
917 B
JavaScript
import { z } from "zod";
|
|
import { emitESMImage } from "../assets/utils/node/emitAsset.js";
|
|
function createImage(pluginContext, shouldEmitFile, entryFilePath, experimentalSvgEnabled) {
|
|
return () => {
|
|
return z.string().transform(async (imagePath, ctx) => {
|
|
const resolvedFilePath = (await pluginContext.resolve(imagePath, entryFilePath))?.id;
|
|
const metadata = await emitESMImage(
|
|
resolvedFilePath,
|
|
pluginContext.meta.watchMode,
|
|
// FUTURE: Remove in this in v6
|
|
experimentalSvgEnabled,
|
|
shouldEmitFile ? pluginContext.emitFile : void 0
|
|
);
|
|
if (!metadata) {
|
|
ctx.addIssue({
|
|
code: "custom",
|
|
message: `Image ${imagePath} does not exist. Is the path correct?`,
|
|
fatal: true
|
|
});
|
|
return z.never();
|
|
}
|
|
return { ...metadata, ASTRO_ASSET: metadata.fsPath };
|
|
});
|
|
};
|
|
}
|
|
export {
|
|
createImage
|
|
};
|