remix-seo-plus
Version:
Collection of SEO utilities like sitemap, robots.txt, etc. for a Remix application. A fork of https://github.com/balavishnuvj/remix-seo with some added bug fixes and features.
18 lines (17 loc) • 495 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRobotsText = void 0;
const typeTextMap = {
userAgent: "User-agent",
allow: "Allow",
disallow: "Disallow",
sitemap: "Sitemap",
crawlDelay: "Crawl-delay",
};
function getRobotsText(policies) {
return policies.reduce((acc, policy) => {
const { type, value } = policy;
return `${acc}${typeTextMap[type]}: ${value}\n`;
}, "");
}
exports.getRobotsText = getRobotsText;