Add first business article and article layout

This commit is contained in:
2026-05-21 12:14:46 -05:00
parent 200e14e2e9
commit 4735704c6f
9617 changed files with 988627 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { removeQueryString } from "@astrojs/internal-helpers/path";
const DATA_PREFIX = "data:";
function inferSourceFormat(src) {
if (src.startsWith(DATA_PREFIX)) {
const mime = src.slice(DATA_PREFIX.length, src.indexOf(";"));
if (mime === "image/svg+xml") return "svg";
const sub = mime.split("/")[1];
return sub || void 0;
}
try {
const cleanSrc = removeQueryString(src).split("#")[0];
const lastDot = cleanSrc.lastIndexOf(".");
if (lastDot === -1) return void 0;
return cleanSrc.slice(lastDot + 1).toLowerCase();
} catch {
return void 0;
}
}
export {
inferSourceFormat
};