import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{Fragment as n,jsx as r,jsxs as i}from"hono/jsx/jsx-runtime";import{load as a}from"cheerio";import{renderToString as o}from"hono/jsx/dom/server";const s=async s=>{let c=Number.parseInt(s.req.query(`limit`)??`10`,10),l=`https://windsurf.com`,u=new URL(`blog`,l).href,d=new URL(`api/blog`,l).href,f=await e(d,{query:{paginate:c,cursor:0}}),p=a(await e(u)),m=p(`html`).attr(`lang`)??`en`,h=p(`title`).first().text(),g=h.split(/\|/).pop()?.trim(),_=f.posts.slice(0,c).map(e=>{let a=e.title,s=e.images?.[0],c=o(i(n,{children:[s?r(`figure`,{children:r(`img`,{src:s,alt:a})}):null,e.summary?r(`blockquote`,{children:e.summary}):null]})),u=e.date,d=e.slug,f=e.tags,p=e.authors.map(e=>({name:e,url:void 0,avatar:void 0})),h=e.slug?`windsurf-blog-${e.slug}`:void 0,g=u;return{title:a,description:c,pubDate:u?t(u):void 0,link:d?new URL(`blog/${d}`,l).href:void 0,category:f,author:p,guid:h,id:h,content:{html:c,text:c},image:s,banner:s,updated:g?t(g):void 0,language:m}});return{title:h,description:p(`meta[property="og:description"]`).attr(`content`),link:u,item:_,allowEmpty:!0,image:p(`meta[property="og:image"]`).attr(`content`),author:g,language:m,id:p(`meta[property="og:url"]`).attr(`content`)}},c={path:`/blog`,name:`Blog`,url:`windsurf.com`,maintainers:[`nczitzk`],handler:s,example:`/windsurf/blog`,parameters:void 0,description:void 0,categories:[`programming`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportRadar:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`windsurf.com/blog`],target:`/blog`}],view:0};export{s as handler,c as route};