1import{d as B,C as G,u as H,j as l,c as d,b as s,f as g,w as f,t as c,F as k,r as v,g as S,e as m,_ as D,m as b,o as u}from"./u4Rt7toN.js";import{f as W,L as z}from"./CnooNrjK.js";import{G as F}from"./BbE8I4-I.js";import{f as V,a as T}from"./XFb7vYk0.js";import{u as P,O as q,W as J,a as Q}from"./C1y__LEA.js";const U={key:0},Z={class:"border-b border-border bg-card/30"},Y={class:"mx-auto max-w-3xl px-6 py-3 text-[12px] text-muted-foreground"},K={class:"text-foreground"},X={class:"mx-auto max-w-3xl px-6 py-12"},ee={class:"text-[12px] font-semibold uppercase tracking-[0.18em] text-muted-foreground"},te={class:"mt-3 text-[36px] font-bold tracking-tight text-foreground sm:text-[44px] sm:leading-[1.1]"},re={class:"mt-3 text-[12px] text-muted-foreground"},oe=["innerHTML"],se={key:0,"aria-label":"On this page",class:"my-7 rounded-xl border border-border bg-card p-5"},ne={class:"mt-2 space-y-1.5 text-[13.5px]"},ae={class:"w-5 shrink-0 tabular-nums text-muted-foreground/70"},ie=["href"],le={class:"prose prose-zinc max-w-none"},de=["id"],ue=["innerHTML"],pe={key:1,class:"mt-12 rounded-xl border border-border bg-card p-5"},ce={class:"mt-2 space-y-1.5"},me={key:2,class:"mt-6 rounded-xl border border-border bg-card/40 p-5"},ge={class:"mt-2 flex flex-wrap gap-2"},fe={class:"mt-12 rounded-2xl border border-border bg-card p-6 text-center"},xe={class:"mt-4 flex flex-wrap justify-center gap-3"},he={key:1,class:"mx-auto max-w-3xl px-6 py-24 text-center"},be={class:"mt-3 text-muted-foreground"},Le=B({__name:"[slug]",setup(ye){const I=G(),O=b(()=>String(I.params.slug??"")),i=b(()=>W(O.value));function R(t,e=158){return t.length>e?`${t.slice(0,e-1).trimEnd()}â¦`:t}H(()=>{const t=i.value;if(!t)return{title:"Not found | Crawlmind"};const e=R(t.summary);return{title:t.title.length<=45?`${t.title} | Crawlmind`:t.title,meta:[{name:"description",content:e},{property:"og:title",content:t.title},{property:"og:description",content:e},{property:"og:type",content:"article"},{property:"og:url",content:`https://crawlmind.ai/learn/${t.slug}`},{property:"og:image",content:"https://crawlmind.ai/og/og-default.png"},{property:"article:modified_time",content:t.updatedAt},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:t.title},{name:"twitter:description",content:e},{name:"robots",content:"index,follow"}],link:[{rel:"canonical",href:`https://crawlmind.ai/learn/${t.slug}`}]}});function j(){const t=i.value;if(!t)return[];const e=t.title+" "+t.lede+" "+t.sections.map(a=>a.heading+" "+a.body).join(" "),r=V(e).slice(0,20),o=[q,J,{"@type":"Article","@id":`https://crawlmind.ai/learn/${t.slug}#article`,headline:t.title,description:t.summary,mainEntityOfPage:`https://crawlmind.ai/learn/${t.slug}`,author:{"@type":"Organization","@id":"https://crawlmind.ai/#organization",name:"Crawlmind",url:"https://crawlmind.ai/",sameAs:Q},publisher:{"@id":"https://crawlmind.ai/#organization"},datePublished:t.publishedAt??t.updatedAt,dateModified:t.updatedAt,image:{"@type":"ImageObject",url:"https://crawlmind.ai/og/og-default.png",contentUrl:"https://crawlmind.ai/og/og-default.png",width:1200,height:630},...r.length?{mentions:r.map(a=>({"@type":"DefinedTerm","@id":`https://crawlmind.ai/glossary/${a.slug}#term`,name:a.term,url:`https://crawlmind.ai/glossary/${a.slug}`,inDefinedTermSet:"https://crawlmind.ai/glossary#set"}))}:{}},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://crawlmind.ai/"},{"@type":"ListItem",position:2,name:"Learn",item:"https://crawlmind.ai/learn"},{"@type":"ListItem",position:3,name:t.title,item:`https://crawlmind.ai/learn/${t.slug}`}]}],n=t.sections.filter(a=>/^(what|why|how|when|where|which|do(es)? |is |are |can )/i.test(a.heading));return n.length>0&&o.push({"@type":"FAQPage",mainEntity:n.map(a=>({"@type":"Question",name:a.heading,acceptedAnswer:{"@type":"Answer",text:M(a.body).slice(0,1200)}}))}),o}P(j());function $(t){return t.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function y(t){let e=$(t);return e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(r,o,n)=>{const a=String(n).trim();return`<a href="${/^(https?:\/\/|\/(?!\/)|#|mailto:)/i.test(a)?a.replace(/"/g,"%22"):"#"}" class="text-primary underline decoration-dotted underline-offset-4 hover:opacity-80">${o}</a>`}),e=e.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),e=e.replace(/`([^`]+)`/g,'<code class="rounded bg-bg-muted/60 px-1 py-0.5 font-mono text-[0.92em]">$1</code>'),e}function A(t){const e=t.split(` 2`),r=[];let o=!1,n=!1,a=!1,x=[],w=[];const _=()=>{o&&(r.push("</ul>"),o=!1)},L=()=>
2{if(a){if(r.push('<div class="my-4 overflow-x-auto"><table class="w-full border-collapse text-[13.5px]">'),x.length>0){r.push('<thead class="bg-bg-muted/40">'),r.push("<tr>"+x[0].map(h=>`<th class="border border-border px-3 py-2 text-left font-semibold">${y(h.trim())}</th>`).join("")+"</tr>"),r.push("</thead><tbody>");for(const h of x.slice(2))r.push("<tr>"+h.map(p=>`<td class="border border-border px-3 py-2 align-top">${y(p.trim())}</td>`).join("")+"</tr>");r.push("</tbody>")}r.push("</table></div>"),a=!1,x=[]}};for(const h of e){const p=h;if(p.trimStart().startsWith("```")){n?(r.push(`<pre class="my-4 overflow-x-auto rounded-lg border border-border bg-bg-muted/40 p-4 font-mono text-[12.5px] leading-relaxed">${$(w.join(` 3`))}</pre>`),w=[],n=!1):(_(),L(),n=!0);continue}if(n){w.push(p);continue}if(/^\s*\|.*\|\s*$/.test(p)){_(),a||(a=!0),x.push(p.trim().slice(1,-1).split("|"));continue}if(L(),p.startsWith("- ")){o||(r.push('<ul class="my-4 list-disc space-y-1.5 pl-6">'),o=!0),r.push(`<li>${y(p.slice(2))}</li>`);continue}_(),p.trim()!==""&&r.push(`<p class="my-3 leading-relaxed">${y(p)}</p>`)}return _(),L(),n&&r.push(`<pre class="my-4 overflow-x-auto rounded-lg border border-border bg-bg-muted/40 p-4 font-mono text-[12.5px] leading-relaxed">${$(w.join(` 4`))}</pre>`),r.join(` 5`)}function M(t){return t.replace(/```[\s\S]*?```/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*`_]/g,"").replace(/\s+/g," ").trim()}const E=b(()=>i.value?.related?i.value.related.map(t=>z.find(e=>e.slug===t)).filter(t=>!!t):[]),N=b(()=>{const t=i.value;if(!t)return{lede:"",sections:[]};const e=new Set,r=T(A(t.lede),e),o=t.sections.map(n=>T(A(n.body),e));return{lede:r,sections:o}}),C=b(()=>{const t=i.value;if(!t)return[];const e=(t.title+" "+t.lede+" "+t.sections.map(o=>o.heading+" "+o.body).join(" ")).toLowerCase(),r=[];for(const o of F)if([o.term.toLowerCase(),o.slug.replace(/-/g," ").toLowerCase()].some(a=>new RegExp(`\\b${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(e))&&(r.push(o),r.length>=6))break;return r});return(t,e)=>{const r=D;return l(i)?(u(),d("article",U,[s("div",Z,[s("div",Y,[g(r,{to:"/",class:"hover:text-foreground"},{default:f(()=>[...e[0]||(e[0]=[m("Home",-1)])]),_:1}),e[2]||(e[2]=s("span",{class:"mx-1.5"},"/",-1)),g(r,{to:"/learn",class:"hover:text-foreground"},{default:f(()=>[...e[1]||(e[1]=[m("Learn",-1)])]),_:1}),e[3]||(e[3]=s("span",{class:"mx-1.5"},"/",-1)),s("span",K,c(l(i).title),1)])]),s("section",X,[s("p",ee,c(l(i).category),1),s("h1",te,c(l(i).title),1),s("p",re," Updated "+c(l(i).updatedAt)+" · by the Crawlmind team ",1),s("div",{class:"my-7 rounded-xl border border-border bg-card/40 p-5 text-[15px] leading-relaxed text-foreground",innerHTML:l(N).lede},null,8,oe),l(i).sections.length>=5?(u(),d("nav",se,[e[4]||(e[4]=s("p",{class:"text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground"}," On this page ",-1)),s("ol",ne,[(u(!0),d(k,null,v(l(i).sections,(o,n)=>(u(),d("li",{key:n,class:"flex gap-2"},[s("span",ae,c(n+1)+".",1),s("a",{href:`#s-${n}`,class:"text-foreground/85 hover:text-primary hover:underline"},c(o.heading),9,ie)]))),128))])])):S("",!0),s("div",le,[(u(!0),d(k,null,v(l(i).sections,(o,n)=>(u(),d("section",{key:n,class:"mt-9"},[s("h2",{id:`s-${n}`,class:"scroll-mt-20 text-[22px] font-semibold tracking-tight text-foreground"},c(o.heading),9,de),s("div",{class:"mt-3 text-[15px] text-foreground/90",innerHTML:l(N).sections[n]},null,8,ue)]))),128))]),l(E).length?(u(),d("section",pe,[e[5]||(e[5]=s("p",{class:"text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground"}," Related ",-1)),s("ul",ce,[(u(!0),d(k,null,v(l(E),o=>(u(),d("li",{key:o.slug},[g(r,{to:`/learn/${o.slug}`,class:"text-[14px] text-primary hover:underline"},{default:f(()=>[m(c(o.title)+" â ",1)]),_:2},1032,["to"])]))),128))])])):S("",!0),l(C).length?(u(),d("section",me,[e[6]||(e[6]=s("p",{class:"text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground"}," Glossary ",-1)),s("ul",ge,[(u(!0),d(k,null,v(l(C),o=>(u(),d("li",{key:o.slug},[g(r,{to:`/glossary/${o.slug}`,class:"inline-flex rounded-md border border-border bg-background px-2.5 py-1 text-[12.5px] text-foreground transition hover:border-primary/40 hover:text-primary"},{default:f(()=>[m(c(o.term),1)]),_:2},1032,["to"])]))),128))])])):S("",!0),s("section",fe,[e[9]||(e[9]=s("h2",{class:"text-[18px] font-semibold tracking-tight text-foreground"}," See how your site scores ",-1)),e[10]||(e[10]=s("p",{class:"mt-1.5 text-[13px] text-muted-foreground"}," Run a free Crawlmind audit: get every page graded on the rules in this guide. ",-1)),s("div",xe,[g(r,{to:"/register",class:"rounded-md bg-primary px-5 py-2 text-[13px] font-semibold text-primary-foreground hover:opacity-90"},{default:f(()=>[...e[7]||(e[7]=[m(" Free audit ",-1)])]),_:1}),g(r,{to:"/tools/ai-crawler-checker",class:"rounded-md border border-border bg-background px-5 py-2 text-[13px] font-semibold text-foreground hover:bg-muted"},{default:f(()=>[...e[8]||(e[8]=[m(" Check AI bot access â ",-1)])]),_:1})])])])])):(u(),d("article",he,[e[13]||(e[13]=s("h1",{class:"text-[32px] font-bold text-foreground"},"Not found",-1)),s("p",be,[e[12]||(e[12]=m(" We don't have a guide at that slug. ",-1)),g(r,{to:"/learn",class:"text-primary underline"},{default:f(()=>[...e[11]||(e[11]=[m("See all guides â",-1)])]),_:1})])]))}}});
5export{Le 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.