PageSourceSearch

https://revrise.ai/assets/LocalSchemaGenerator-DY7ZO90H.js

js revrise.ai collected 2026-10-05 15:25:46 UTC 6,367 bytes, 3 lines download raw bytes

1import{r as t,j as e,S as I,H,B as G,L as O,A as D,F as E}from"./index-lAXx3fBB.js";import{I as r}from"./input-CHWbAtk5.js";import{L as a}from"./label-bYOA2eFU.js";import{T as $}from"./textarea-C4TvlxWN.js";import{P as J}from"./PageHero-B-O-YuEN.js";import{r as M}from"./page-hero-solutions-UwiLs6Y8.js";import{C as U}from"./check-BcGRHJJu.js";import{C as W}from"./copy-BaNJ0P8F.js";function ee(){const[d,y]=t.useState(""),[m,N]=t.useState("LocalBusiness"),[o,b]=t.useState(""),[l,f]=t.useState(""),[h,S]=t.useState(""),[u,C]=t.useState(""),[p,F]=t.useState("CA"),[x,L]=t.useState(""),[g,B]=t.useState("US"),[i,R]=t.useState("Mo-Fr 09:00-17:00"),[n,w]=t.useState("$$"),[c,P]=t.useState(""),[k,j]=t.useState(!1),v=`<script type="application/ld+json">
2${t.useMemo(()=>{const s={"@context":"https://schema.org","@type":m,name:d||"Your Business Name",...l?{url:l}:{},...o?{telephone:o}:{},...n?{priceRange:n}:{},...c?{image:c}:{},address:{"@type":"PostalAddress",streetAddress:h,addressLocality:u,addressRegion:p,postalCode:x,addressCountry:g},...i?{openingHours:i.split(",").map(T=>T.trim()).filter(Boolean)}:{}};return JSON.stringify(s,null,2)},[d,m,o,l,h,u,p,x,g,i,n,c])}
3<\/script>`,A=async()=>{await navigator.clipboard.writeText(v),j(!0),setTimeout(()=>j(!1),2e3)};return e.jsxs("div",{className:"min-h-screen",children:[e.jsx(I,{title:"Free Local Business Schema Generator | JSON-LD | RevRise.ai",description:"Generate copy-paste JSON-LD schema for your local business in 30 seconds. Improves rich results, map pack visibility, and voice search.",canonical:"/tools/local-schema-generator",breadcrumbs:[{name:"Tools",path:"/tools"},{name:"Local Schema Generator",path:"/tools/local-schema-generator"}]}),e.jsx(H,{}),e.jsx(J,{image:M,eyebrow:"Free Tool",markerRight:"Schema Generator",title:e.jsxs(e.Fragment,{children:["Local Business Schema,",e.jsx("br",{}),e.jsx("span",{className:"italic font-normal",children:"generated in 30 seconds."})]}),subtitle:"Fill in your details. Copy the JSON-LD block. Paste it into your <head>. Instant eligibility for rich results, map pack visibility, and voice-search answers."}),e.jsx("section",{className:"border-t border-border",children:e.jsx("div",{className:"container mx-auto px-4 py-12 lg:py-16",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 lg:p-8 space-y-4",children:[e.jsx("h2",{className:"font-display text-2xl font-bold",children:"Your business"}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"type",children:"Business type"}),e.jsx("select",{id:"type",value:m,onChange:s=>N(s.target.value),className:"mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:["LocalBusiness","Dentist","MedicalBusiness","HomeAndConstructionBusiness","AutomotiveBusiness","Restaurant","BeautySalon","ProfessionalService","LegalService","FinancialService","RealEstateAgent"].map(s=>e.jsx("option",{value:s,children:s},s))})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"name",children:"Business name"}),e.jsx(r,{id:"name",value:d,onChange:s=>y(s.target.value),className:"mt-1.5",placeholder:"Acme Dental"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(a,{htmlFor:"phone",children:"Phone"}),e.jsx(r,{id:"phone",value:o,onChange:s=>b(s.target.value),className:"mt-1.5",placeholder:"+1-760-555-0100"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"url",children:"Website URL"}),e.jsx(r,{id:"url",value:l,onChange:s=>f(s.target.value),className:"mt-1.5",placeholder:"https://…"})]})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"street",children:"Street"}),e.jsx(r,{id:"street",value:h,onChange:s=>S(s.target.value),className:"mt-1.5"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx(a,{htmlFor:"city",children:"City"}),e.jsx(r,{id:"city",value:u,onChange:s=>C(s.target.value),className:"mt-1.5"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"region",children:"State"}),e.jsx(r,{id:"region",value:p,onChange:s=>F(s.target.value),className:"mt-1.5"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"postal",children:"ZIP"}),e.jsx(r,{id:"postal",value:x,onChange:s=>L(s.target.value),className:"mt-1.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(a,{htmlFor:"country",children:"Country"}),e.jsx(r,{id:"country",value:g,onChange:s=>B(s.target.value),className:"mt-1.5"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"pr",children:"Price range"}),e.jsx(r,{id:"pr",value:n,onChange:s=>w(s.target.value),className:"mt-1.5",placeholder:"$$"})]})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"hours",children:"Hours (comma-separated, schema.org format)"}),e.jsx(r,{id:"hours",value:i,onChange:s=>R(s.target.value),className:"mt-1.5",placeholder:"Mo-Fr 09:00-17:00, Sa 10:00-14:00"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"image",children:"Image URL (optional)"}),e.jsx(r,{id:"image",value:c,onChange:s=>P(s.target.value),className:"mt-1.5",placeholder:"https://…/logo.png"})]})]}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 lg:p-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h2",{className:"font-display text-2xl font-bold",children:"Copy & paste"}),e.jsx(G,{variant:"outline",size:"sm",onClick:A,children:k?e.jsxs(e.Fragment,{children:[e.jsx(U,{className:"mr-2 h-4 w-4"})," Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"mr-2 h-4 w-4"})," Copy"]})})]}),e.jsx($,{readOnly:!0,value:v,className:"font-mono text-xs h-[520px]"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-3",children:["Paste this into your site's ",e.jsx("code",{className:"text-foreground",children:"<head>"}),". Test with Google's Rich Results Test."]}),e.jsxs("div",{className:"mt-6 rounded-xl bg-muted/50 p-5 text-sm",children:[e.jsx("p",{className:"font-medium",children:"Want us to wire schema across your whole site?"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Every RevRise-built site ships with LocalBusiness, FAQ, Breadcrumb, and Service schema by default."}),e.jsxs(O,{to:"/contact#book-call",className:"mt-3 inline-flex items-center text-primary font-medium",children:["Book a scoping call ",e.jsx(D,{className:"ml-2 h-4 w-4"})]})]})]})]})})}),e.jsx(E,{})]})}
3export{ee 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.