@gb-npm/cms-worker-cf
v0.1.1
Published
Cloudflare Worker adapters for @gb-npm/cms-sdk — sitemap.xml, robots.txt, RSS, and redirect middleware
Readme
@gb-npm/cms-worker-cf
Cloudflare Worker adapters for @gb-npm/cms-sdk. Thin response builders that turn CMS client calls into Response objects suitable for a Worker fetch handler.
Provided helpers
redirectMiddleware(cms, pathname, { baseUrl })— resolves a path againstcms.redirectsand returns a301 Response(ornullfor no match).sitemapHandler(cms)— returns the CMS-generatedsitemap.xmlasapplication/xml.robotsHandler(cms, { baseUrl, sitemapPath?, disallow? })— returnsrobots.txtastext/plain, with an absoluteSitemap:line.feedHandler(cms)— returns the CMS-generated RSS feed asapplication/rss+xml.
See the parent README for the full SDK overview.
