import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{load as r}from"cheerio";const i={path:`/blog/:topic?`,categories:[`blog`],example:`/ceph/blog/a11y`,parameters:{category:`filter blog post by category, return all posts if not specified`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`ceph.io/`]}],name:`Blog`,maintainers:[`pandada8`],handler:a,url:`ceph.io`};async function a(i){let{category:a}=i.req.param(),o=a?`https://ceph.io/en/news/blog/category/${a}/`:`https://ceph.io/en/news/blog/`,s=(await n.get(o)).data,c=r(s),l=c(`#main .section li`).toArray().map(e=>{let n=c(e),r=n.find(`a`).text().trim(),i=t(n.find(`time`).attr(`datetime`));return{title:r,link:new URL(n.find(`a`).attr(`href`),`https://ceph.io`).href,pubDate:i}});return{title:`Ceph Blog`,link:o,item:await Promise.all(l.map(t=>e.tryGet(t.link,async()=>{let e=(await n.get(t.link)).data,i=r(e);return t.author=i(`#main section > div:nth-child(1) span`).text().trim(),t.description=i(`#main section > div:nth-child(2) > div`).html(),t})))}}export{i as route};