import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";const n={path:`/`,example:`/runyeah`,radar:[{source:[`runyeah.world/`]}],categories:[`sport`],name:`最新文章`,maintainers:[`TonyRL`],handler:r,url:`runyeah.world/`};async function r(n){let r=`https://runyeah.world`,{data:i}=await t(`${r}/wp-json/wp/v2/posts`,{searchParams:{_embed:!0,per_page:n.req.query(`limit`)?Number.parseInt(n.req.query(`limit`)):30}}),a=i;return typeof i!=`object`&&(a=JSON.parse(i.match(/\[(.*)]/)[0])),{title:`最新文章 - 跑野大爆炸`,link:r,item:a.map(t=>({title:t.title.rendered,description:t.content.rendered,pubDate:e(t.date_gmt),updated:e(t.modified_gmt),author:t._embedded.author.map(e=>e.name).join(`, `),category:t._embedded[`wp:term`][0].map(e=>e.name),link:t.link}))}}export{n as route};