1import{_ as P}from"./CRX4KUIa.js";import{A as x,z as e,y as d,B as v,e as M,u as R,h as k,g as s,o as A}from"./C1esFFav.js";import{u as T,a as z}from"./Bd_42o-m.js";import{u as y}from"./DGxUKYio.js";import"./DYszNrqt.js";import"./aAh-jved.js";import"./Clw5YhZg.js";const O={__name:"[page]",async setup(D){let t,n;const p=x(),a=e(()=>p.params.categorySlug),r=e(()=>Number(p.params.page)||1),{fetchPosts:f,fetchCategories:_}=z(),{data:h}=([t,n]=d(()=>y("blog-categories",()=>_())),t=await t,n(),t),m=e(()=>h.value?.data||[]),o=e(()=>m.value.find(i=>i.slug===a.value));if(!o.value)throw v({statusCode:404,statusMessage:"Category not found",fatal:!0});const{data:l}=([t,n]=d(()=>y(()=>`blog-category-${a.value}-${r.value}`,()=>f({page:r.value,categorySlug:a.value}),{watch:[a,r]})),t=await t,n(),t);if(!l.value?.data?.length)throw v({statusCode:404,statusMessage:"Page not found",fatal:!0});const b=e(()=>l.value?.data||[]),$=e(()=>l.value?.meta||{}),w=i=>i===1?`/blog/category/${a.value}/`:`/blog/category/${a.value}/page/${i}/`,{fullUrl:B,truncate:C}=T(),c=e(()=>`${o.value.title} - Page ${r.value} - Kommunity Blog`),u=e(()=>C(o.value.description||`${o.value.title} posts on the Kommunity blog â community management, events, growth, and monetization.`,160)),g=e(()=>B(`/blog/category/${a.value}/page/${r.value}`));return M({title:c,ogTitle:c,description:u,ogDescription:u,ogType:"website",ogUrl:g,twitterCard:"summary_large_image"}),R({link:[{rel:"canonical",href:g}],script:[{type:"application/ld+json",innerHTML:e(()=>JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:c.value,description:u.value,url:g.value}))}]}),(i,H)=>{const S=P;return A(),k(S,{posts:s(b),meta:s($),categories:s(m),"active-category-slug":s(a),"page-route-builder":w,"sidebar-title":s(o)?.title,"sidebar-description":s(o)?.description||""},null,8,["posts","meta","categories","active-category-slug","sidebar-title","sidebar-description"])}}};export{O as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.