Skip to content
Sign inJoin waitlist

Pages and sections — Goeboek Astro

A page is a small file that picks sections and hands them content. src/pages/index.astro is the whole of Home: the hero, Featured Properties, the About block, the call to action and the latest posts.

<Layout title={site.title} absolute description={site.description}>
<main>
<Hero … properties={properties.slice(0, hero.slideshow.count).map(…)} />
<FeaturedProperties … properties={properties.slice(featured.offset, featured.offset + featured.count).map(…)} />
<AboutIntro … />
<Cta />
<LatestPosts title={blog.title} posts={posts.slice(0, blog.count).map(toPostCard)} />
</main>
</Layout>
  • Layout (src/layouts/Layout.astro) gives a page its <head> — browser title, description, canonical link, share card, icons and fonts — the sticky header and the footer. title is shown as “ | Goeboek” (<code dir="auto">absolute</code> keeps it whole).</li> <li><code dir="auto">getProperties()</code>, <code dir="auto">getTestimonials()</code> and <code dir="auto">getPosts()</code> read the collections, and <code dir="auto">toPropertyCard()</code>, <code dir="auto">toPostCard()</code> and <code dir="auto">toTestimonialCard()</code> (<code dir="auto">src/lib/to-ui.ts</code>) turn their items into what the cards show (see <a href="/docs/goeboek/astro/content">Editing the content</a>).</li> <li>The page passes its copy (<code dir="auto">src/content/pages/home.json</code>) and the items to the sections; <code dir="auto">Cta</code> reads the shared copy in <code dir="auto">src/content/sections.json</code> itself.</li> </ul> <div class="sl-heading-wrapper level-h2"><h2 id="the-pages">The pages</h2><a class="sl-anchor-link" href="#the-pages"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “The pages”</span></a></div> <p>15 kinds of page and 58 addresses in the demo, 55 of them in the sitemap. Every address is built from <code dir="auto">src/content/routes.ts</code>.</p> <table> <thead> <tr> <th>Page</th> <th>Address</th> <th>Page file</th> <th>Copy (<code dir="auto">src/content/pages/</code>)</th> <th>Items it shows</th> </tr> </thead> <tbody> <tr> <td>Home</td> <td><code dir="auto">/</code></td> <td><code dir="auto">src/pages/index.astro</code></td> <td><code dir="auto">home.json</code></td> <td>the first 4 properties (slideshow), the next 6 (Featured), the first 5 testimonials, the 4 newest posts</td> </tr> <tr> <td>Properties</td> <td><code dir="auto">/property</code></td> <td><code dir="auto">src/pages/property.astro</code></td> <td><code dir="auto">properties.json</code></td> <td>every property, six at a time with “Load More”</td> </tr> <tr> <td>Type</td> <td><code dir="auto">/type/sell</code>, <code dir="auto">/type/rent</code></td> <td><code dir="auto">src/pages/type/[type].astro</code></td> <td><code dir="auto">properties.json</code></td> <td>every property for sale or for rent</td> </tr> <tr> <td>Location</td> <td><code dir="auto">/location/<slug></code></td> <td><code dir="auto">src/pages/location/[slug].astro</code></td> <td><code dir="auto">properties.json</code></td> <td>every property of the location</td> </tr> <tr> <td>Property category</td> <td><code dir="auto">/property-category/<slug></code></td> <td><code dir="auto">src/pages/property-category/[slug].astro</code></td> <td><code dir="auto">properties.json</code></td> <td>every property of the category</td> </tr> <tr> <td>Agent</td> <td><code dir="auto">/agent/<slug></code></td> <td><code dir="auto">src/pages/agent/[slug].astro</code></td> <td><code dir="auto">agent.json</code></td> <td>the agent, then every property of the agent</td> </tr> <tr> <td>Property</td> <td><code dir="auto">/property/<slug></code></td> <td><code dir="auto">src/pages/property/[slug].astro</code></td> <td><code dir="auto">property.json</code></td> <td>one property, its agent, two more in its location, up to four related</td> </tr> <tr> <td>Blog</td> <td><code dir="auto">/blog</code></td> <td><code dir="auto">src/pages/blog.astro</code></td> <td><code dir="auto">blog.json</code></td> <td>every post, newest first</td> </tr> <tr> <td>Blog post</td> <td><code dir="auto">/blog/<slug></code></td> <td><code dir="auto">src/pages/blog/[slug].astro</code></td> <td><code dir="auto">post.json</code></td> <td>one post, the three newest, the first property, up to four others of its category</td> </tr> <tr> <td>About</td> <td><code dir="auto">/about</code></td> <td><code dir="auto">src/pages/about.astro</code></td> <td><code dir="auto">about.json</code></td> <td>every testimonial, six at a time (four below 1200 px)</td> </tr> <tr> <td>Contact</td> <td><code dir="auto">/contact</code></td> <td><code dir="auto">src/pages/contact.astro</code></td> <td><code dir="auto">contact.json</code></td> <td>—</td> </tr> <tr> <td>Add property</td> <td><code dir="auto">/add-property</code></td> <td><code dir="auto">src/pages/add-property.astro</code></td> <td><code dir="auto">add-property.json</code></td> <td>—</td> </tr> <tr> <td>Tour scheduled</td> <td><code dir="auto">/success-scheduled</code></td> <td><code dir="auto">src/pages/success-scheduled.astro</code></td> <td><code dir="auto">success.json</code> → <code dir="auto">tour</code></td> <td>—</td> </tr> <tr> <td>Property submitted</td> <td><code dir="auto">/success-add-property</code></td> <td><code dir="auto">src/pages/success-add-property.astro</code></td> <td><code dir="auto">success.json</code> → <code dir="auto">property</code></td> <td>—</td> </tr> <tr> <td>404</td> <td>any unknown address</td> <td><code dir="auto">src/pages/404.astro</code></td> <td><code dir="auto">not-found.json</code></td> <td>—</td> </tr> </tbody> </table> <p>The listing pages also read <code dir="auto">filters</code> in <code dir="auto">src/content/sections.json</code>. All 58 addresses of the demo:</p> <table> <thead> <tr> <th>Page</th> <th>Addresses</th> </tr> </thead> <tbody> <tr> <td>Fixed pages (8)</td> <td><code dir="auto">/</code>, <code dir="auto">/property</code>, <code dir="auto">/blog</code>, <code dir="auto">/about</code>, <code dir="auto">/contact</code>, <code dir="auto">/add-property</code>, <code dir="auto">/success-scheduled</code>, <code dir="auto">/success-add-property</code></td> </tr> <tr> <td>Types (2)</td> <td><code dir="auto">/type/sell</code> (6 properties), <code dir="auto">/type/rent</code> (15)</td> </tr> <tr> <td>Locations (6)</td> <td><code dir="auto">/location/brooklyn</code> (3), <code dir="auto">/location/manhattan</code> (4), <code dir="auto">/location/queens</code> (6), <code dir="auto">/location/staten-island</code> (4), <code dir="auto">/location/the-bronx</code> (4), <code dir="auto">/location/no-location</code> (none)</td> </tr> <tr> <td>Categories (5)</td> <td><code dir="auto">/property-category/apartments</code> (11), <code dir="auto">/property-category/condos</code> (4), <code dir="auto">/property-category/houses</code> (2), <code dir="auto">/property-category/villas</code> (4), <code dir="auto">/property-category/uncategory</code> (none)</td> </tr> <tr> <td>Agents (4)</td> <td><code dir="auto">/agent/steve-parker</code> (7), <code dir="auto">/agent/ingrid-vulk</code> (5), <code dir="auto">/agent/rachel-gray</code> (9), <code dir="auto">/agent/no-name</code> (none)</td> </tr> <tr> <td>Properties (21)</td> <td><code dir="auto">/property/south-sunlight-apartment</code>, <code dir="auto">/property/marble-house</code>, <code dir="auto">/property/family-mansion</code>, <code dir="auto">/property/east-sunlight-apartment</code>, <code dir="auto">/property/south-side-garden</code>, <code dir="auto">/property/modern-family-home</code>, <code dir="auto">/property/wooden-house</code>, <code dir="auto">/property/rustic-forest-cabin</code>, <code dir="auto">/property/white-studio-apartment</code>, <code dir="auto">/property/riverside-bungalow</code>, <code dir="auto">/property/forest-cabin</code>, <code dir="auto">/property/queens-family-home</code>, <code dir="auto">/property/bright-spacious-apartment</code>, <code dir="auto">/property/eclectic-house</code>, <code dir="auto">/property/penthouse-apartment</code>, <code dir="auto">/property/white-studio-loft</code>, <code dir="auto">/property/green-house</code>, <code dir="auto">/property/mountain-cottage</code>, <code dir="auto">/property/balcony-apartment</code>, <code dir="auto">/property/wooden-bungalow</code>, <code dir="auto">/property/gardenia-house</code></td> </tr> <tr> <td>Posts (12)</td> <td><code dir="auto">/blog/the-power-of-natural-light-in-architectural-design</code>, <code dir="auto">/blog/architectural-photography-capturing-the-essence-of-buildings</code>, <code dir="auto">/blog/the-future-of-smart-homes-innovative-interior-design</code>, <code dir="auto">/blog/the-art-of-interior-design-creating-spaces-that-inspire</code>, <code dir="auto">/blog/preservation-and-restoration-saving-architectural-heritage</code>, <code dir="auto">/blog/from-blueprint-to-reality-the-journey-of-construction</code>, <code dir="auto">/blog/designing-for-well-being-the-intersection-of-health-and-architecture</code>, <code dir="auto">/blog/sculpting-spaces-the-role-of-art-in-architecture</code>, <code dir="auto">/blog/balancing-tradition-and-innovation-in-architecture</code>, <code dir="auto">/blog/harmonizing-form-and-function-in-modern-architecture</code>, <code dir="auto">/blog/architectural-marvels-iconic-buildings-around-the-world</code>, <code dir="auto">/blog/sustainable-architecture-building-a-greener-future</code></td> </tr> </tbody> </table> <p>The 404 page answers any other address (the footer’s “404” link opens <code dir="auto">/404</code>). The sitemap lists the 58 addresses but the three empty defaults (<code dir="auto">/location/no-location</code>, <code dir="auto">/property-category/uncategory</code>, <code dir="auto">/agent/no-name</code>), which say <code dir="auto">noindex, follow</code>. The style guide (<code dir="auto">/style-guide</code>, <code dir="auto">src/pages/style-guide.astro</code>) is a page too, but it is not in the sitemap, is hidden from search engines and linked from nowhere.</p> <p>The site builds every page as a file (<code dir="auto">build: { format: "file" }</code> in <code dir="auto">astro.config.mjs</code>): <code dir="auto">property/marble-house.html</code>, served at <code dir="auto">/property/marble-house</code> (<a href="/docs/goeboek/astro/publish#deploy">Going live</a>). To change an address, rename its file or folder in <code dir="auto">src/pages/</code> and its entry in <code dir="auto">routes.ts</code>.</p> <div class="sl-heading-wrapper level-h2"><h2 id="the-sections-you-can-use">The sections you can use</h2><a class="sl-anchor-link" href="#the-sections-you-can-use"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “The sections you can use”</span></a></div> <p>In <code dir="auto">src/components/sections/</code>, one file each.</p> <table> <thead> <tr> <th>Section</th> <th>Used on</th> <th>Copy</th> </tr> </thead> <tbody> <tr> <td><code dir="auto">Hero</code> (the title, the lead, “See all Property”, the two facts, the testimonials slideshow, the slideshow of large property cards)</td> <td>Home</td> <td><code dir="auto">home.hero</code></td> </tr> <tr> <td><code dir="auto">FeaturedProperties</code> (the title, six cards — four on phones — and “More Property”)</td> <td>Home</td> <td><code dir="auto">home.featured</code></td> </tr> <tr> <td><code dir="auto">AboutIntro</code> (the label, title, texts, two photos and “More about Us”)</td> <td>Home</td> <td><code dir="auto">home.about</code></td> </tr> <tr> <td><code dir="auto">Cta</code> (the photo with the label, title, text, “Get Started” and “Contact Us”)</td> <td>Home, About</td> <td><code dir="auto">cta</code> in <code dir="auto">sections.json</code></td> </tr> <tr> <td><code dir="auto">LatestPosts</code> (the title and post cards; with <code dir="auto">bordered</code>, the post page’s related posts)</td> <td>Home, Blog post</td> <td><code dir="auto">home.blog</code>, <code dir="auto">post.related</code></td> </tr> <tr> <td><code dir="auto">PropertyListing</code> (the label, title and text, the sidebar — the filter, and the agent card on agent pages — and the cards, with “Load More” when given a <code dir="auto">pageSize</code>)</td> <td>Properties, Type, Location, Property category, Agent</td> <td><code dir="auto">filters</code> in <code dir="auto">sections.json</code>; <code dir="auto">agent.json</code> on agent pages</td> </tr> <tr> <td><code dir="auto">PropertyOverview</code> (the property’s facts, photos, texts, details, utilities, video and location; beside it the agent, <code dir="auto">TourForm</code> and “More in <location>”)</td> <td>Property</td> <td><code dir="auto">property.json</code></td> </tr> <tr> <td><code dir="auto">TourForm</code> (“Schedule tour”)</td> <td>Property, inside <code dir="auto">PropertyOverview</code></td> <td><code dir="auto">property.tour</code></td> </tr> <tr> <td><code dir="auto">RelatedProperties</code> (the title, the related cards and “More Property”)</td> <td>Property</td> <td><code dir="auto">property.related</code></td> </tr> <tr> <td><code dir="auto">BlogList</code> (the title and every post)</td> <td>Blog</td> <td><code dir="auto">blog.title</code></td> </tr> <tr> <td><code dir="auto">PostArticle</code> (the title, date, category and author, the cover, the text; the sidebar with the about text, “Recent posts” and “Latest Property”)</td> <td>Blog post</td> <td><code dir="auto">post.json</code></td> </tr> <tr> <td><code dir="auto">PageTitle</code> (the centred label, title and lead over a photo or a map)</td> <td>About, Contact</td> <td><code dir="auto">about.hero</code>, <code dir="auto">contact.title</code></td> </tr> <tr> <td><code dir="auto">AboutStory</code> (“Our Journey to Excellence”)</td> <td>About</td> <td><code dir="auto">about.journey</code></td> </tr> <tr> <td><code dir="auto">AboutValues</code> (the three values, two photos and “View our property”)</td> <td>About</td> <td><code dir="auto">about.values</code></td> </tr> <tr> <td><code dir="auto">Testimonials</code> (every testimonial with “Load More”; anchor <code dir="auto">#testimonials</code>)</td> <td>About</td> <td><code dir="auto">about.testimonials</code></td> </tr> <tr> <td><code dir="auto">ContactDetails</code> (the address, opening hours, e-mail and phones, the contact form)</td> <td>Contact</td> <td><code dir="auto">contact.details</code>, <code dir="auto">contact.form</code>, <code dir="auto">contact</code> in <code dir="auto">site.json</code></td> </tr> <tr> <td><code dir="auto">AddPropertyForm</code> (the page title and the whole form)</td> <td>Add property</td> <td><code dir="auto">add-property.json</code></td> </tr> <tr> <td><code dir="auto">SuccessMessage</code> (the title, the illustration, the two lines and the button)</td> <td>Tour scheduled, Property submitted</td> <td><code dir="auto">success.tour</code>, <code dir="auto">success.property</code></td> </tr> </tbody> </table> <p>The section labels and titles are <code dir="auto">Label</code> and <code dir="auto">SectionTitle</code>, the lines between blocks the sections’ <code dir="auto">bordered</code> top line, helpers of the design system, not sections. The 404 page draws its one block in the page file.</p> <div class="sl-heading-wrapper level-h2"><h2 id="how-the-pages-link-to-each-other">How the pages link to each other</h2><a class="sl-anchor-link" href="#how-the-pages-link-to-each-other"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “How the pages link to each other”</span></a></div> <table> <thead> <tr> <th>Page</th> <th>Linked from</th> </tr> </thead> <tbody> <tr> <td>Home</td> <td>The logo, “Home” in the header, “Return to Homepage” (404), “Back to Homepage” (Property submitted)</td> </tr> <tr> <td>Properties</td> <td>“Property” in the header, “See all Property”, “More Property”, “Get Started”, “View our property”, “Browse More Properties”, “All Property” in the footer, “All” in the filter</td> </tr> <tr> <td>Type</td> <td>“To Buy” and “To Rent” in the footer, “Sell” and “Rent” in the filter</td> </tr> <tr> <td>Location, Property category</td> <td>The filter, a card’s meta line, a property page’s meta line</td> </tr> <tr> <td>Agent</td> <td>The filter, the agent’s chip on a hovered card, “Contact” on Home’s large cards, the agent’s name and “View My Property” on a property page</td> </tr> <tr> <td>A property</td> <td>Its card (Home, the listings, “More in …”, “Related properties”, “Latest Property”), “Request a tour” on Home’s large cards</td> </tr> <tr> <td>Blog</td> <td>“Blog” in the header, “Latest News” in the footer</td> </tr> <tr> <td>A post</td> <td>Its card (Home, Blog, “Recent posts”, the related posts)</td> </tr> <tr> <td>About</td> <td>“About Us” in the header and the footer, “More about Us”; <code dir="auto">/about#testimonials</code> from “More Details” in the hero</td> </tr> <tr> <td>Contact</td> <td>“Contact us” in the header, “Contact Us” in the footer and the call to action</td> </tr> <tr> <td>Add property</td> <td>“Add Property” in the header</td> </tr> <tr> <td>Tour scheduled, Property submitted</td> <td>The tour and Add property forms, once sent (<a href="/docs/goeboek/astro/forms">Forms</a>)</td> </tr> </tbody> </table> <div class="sl-heading-wrapper level-h2"><h2 id="page-maps">Page maps</h2><a class="sl-anchor-link" href="#page-maps"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Page maps”</span></a></div> <p>Every kind of page with each section outlined and labelled: the component that renders it, the copy it reads and the collections its items come from. The header and the footer take their texts from <code dir="auto">src/content/site.json</code>. Photos are the placeholders of the download; the maps are taken at 1200 px, where the listings and the property page have their sidebar.</p> <div class="sl-heading-wrapper level-h3"><h3 id="home">Home</h3><a class="sl-anchor-link" href="#home"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Home”</span></a></div> <p>Five blocks: the hero (with the testimonials and the large property cards), Featured Properties, the About block, the call to action and the latest posts. The copy is in <code dir="auto">src/content/pages/home.json</code> (<a href="/docs/goeboek/astro/content#home-section-by-section">Editing the content</a>), the call to action’s in <code dir="auto">sections.json</code>.</p> <p><img alt="Home: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="3695" src="/docs/_astro/map-home.BEhmt1U1_1onzJu.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="properties-type-location-and-property-category">Properties, Type, Location and Property category</h3><a class="sl-anchor-link" href="#properties-type-location-and-property-category"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Properties, Type, Location and Property category”</span></a></div> <p>One block, <code dir="auto">PropertyListing</code>: the label, title and text, then the filter in the sidebar and the cards in two columns (one on phones). <code dir="auto">/property</code> shows six cards and “Load More” adds six at a time; the other listings show all their properties at once. The filter’s heading names the listing (“Explore: All”, “Explore: Sell”, “Explore: Brooklyn”). The four kinds of listing share the layout; the map shows Properties.</p> <p><img alt="Properties: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="1550" src="/docs/_astro/map-properties.CsiK3QRk_Z1HTomp.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="agent">Agent</h3><a class="sl-anchor-link" href="#agent"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Agent”</span></a></div> <p>The same block with the agent’s name as its label, <code dir="auto">agent.json</code>’s title and text, and the agent’s card (photo, address, office phone, mobile, WhatsApp, e-mail and text) above the filter (“Explore: Steve Parker”).</p> <p><img alt="Agent: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="1773" src="/docs/_astro/map-agent.DzXJxnIc_Z1RBlUJ.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="property">Property</h3><a class="sl-anchor-link" href="#property"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Property”</span></a></div> <p>Two blocks: <code dir="auto">PropertyOverview</code> (the type, the title, the meta line, price and size with “Contact Sales”, the main photo over four gallery photos, Description, Property features, Property details, Property utility, Video and Location; in the sidebar the agent, “Schedule tour” and “More in <location>”: the first two other properties of the same location) and <code dir="auto">RelatedProperties</code> (the other properties of the same category and type: three from 1200 px, four below, then “More Property”). Everything but the labels (<code dir="auto">src/content/pages/property.json</code>) is the property’s entry in <code dir="auto">src/content/collections/properties.json</code> and its agent’s in <code dir="auto">agents.json</code>.</p> <p><img alt="Property: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="2968" src="/docs/_astro/map-property.CHsiIg_T_Zwk6JW.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="blog">Blog</h3><a class="sl-anchor-link" href="#blog"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Blog”</span></a></div> <p>One block: the title and every post, newest first, in four columns from 1440 px, three on laptops, two on tablets.</p> <p><img alt="Blog: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="2349" src="/docs/_astro/map-blog.DGM0T9jO_Z2q7Pd7.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="blog-post">Blog post</h3><a class="sl-anchor-link" href="#blog-post"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Blog post”</span></a></div> <p>Two blocks: the article (the title, the date, category and author, the cover and the text, with the sidebar: the logo and the about text, “Recent posts” and “Latest Property”) and the related posts (up to four other posts of the same category, newest first; three on laptops and phones). The post is its entry in <code dir="auto">src/content/collections/posts.json</code>; the labels are in <code dir="auto">src/content/pages/post.json</code>.</p> <p><img alt="Blog post: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="2038" src="/docs/_astro/map-post.D5_Pqzdt_ZWL7i1.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="about">About</h3><a class="sl-anchor-link" href="#about"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “About”</span></a></div> <p>Five blocks: the page title over the photo, the story, the values with two photos, the call to action and the testimonials (six, then “Load More”; four at a time below 1200 px). All the copy is in <code dir="auto">src/content/pages/about.json</code>.</p> <p><img alt="About: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="3248" src="/docs/_astro/map-about.DWx3SfJn_1Wr7EV.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="contact">Contact</h3><a class="sl-anchor-link" href="#contact"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Contact”</span></a></div> <p>Two blocks: the page title over the map (a Google Maps search for <code dir="auto">map.query</code> in <code dir="auto">contact.json</code>) and the contact details with the form. The address, hours, e-mail and phones are <code dir="auto">contact</code> in <code dir="auto">src/content/site.json</code>.</p> <p><img alt="Contact: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="1632" src="/docs/_astro/map-contact.K-Rmwfx1_1nJkK2.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="add-property">Add property</h3><a class="sl-anchor-link" href="#add-property"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Add property”</span></a></div> <p>One block: the page title and the form in five groups (Personal Information, Property Description, Property Details, Property Utility, Message), all from <code dir="auto">src/content/pages/add-property.json</code>.</p> <p><img alt="Add property: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="2155" src="/docs/_astro/map-add-property.CN_P1Ho6_M7d4n.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="tour-scheduled-and-property-submitted">Tour scheduled and Property submitted</h3><a class="sl-anchor-link" href="#tour-scheduled-and-property-submitted"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Tour scheduled and Property submitted”</span></a></div> <p>One block, <code dir="auto">SuccessMessage</code>: the title, the illustration, the subtitle and text, and the button. The two pages share it, with their own copy in <code dir="auto">success.json</code> (<code dir="auto">tour</code>, <code dir="auto">property</code>) and illustration; the map shows Tour scheduled.</p> <p><img alt="Tour scheduled: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="1079" src="/docs/_astro/map-success.CBPk3TNZ_Z1S30aG.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="404">404</h3><a class="sl-anchor-link" href="#404"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “404”</span></a></div> <p>One block: the title, “404”, the two lines and “Return to Homepage”. The words are in <code dir="auto">src/content/pages/not-found.json</code>.</p> <p><img alt="404: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="932" src="/docs/_astro/map-not-found.BSiv0aCt_ZVp78L.webp"></p> <div class="sl-heading-wrapper level-h2"><h2 id="reordering-or-removing-a-section">Reordering or removing a section</h2><a class="sl-anchor-link" href="#reordering-or-removing-a-section"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Reordering or removing a section”</span></a></div> <p>Move the lines in the page file, or delete one. To take the call to action off About, delete <code dir="auto"><Cta /></code> in <code dir="auto">src/pages/about.astro</code>; its copy in <code dir="auto">sections.json</code> can stay (Home still uses it). Keep in step:</p> <ul> <li><strong>Anchors.</strong> “More Details” in the hero links <code dir="auto">/about#testimonials</code>, the <code dir="auto">id</code> of About’s testimonials: change both if you remove one.</li> <li><strong>The <code dir="auto"><h1></code>.</strong> Each page has one: the hero’s title on Home, the title of <code dir="auto">PropertyListing</code>, <code dir="auto">PropertyOverview</code>, <code dir="auto">PostArticle</code>, <code dir="auto">PageTitle</code>, <code dir="auto">BlogList</code>, <code dir="auto">AddPropertyForm</code> and <code dir="auto">SuccessMessage</code>. Removing that section leaves the page without one.</li> </ul> <div class="sl-heading-wrapper level-h2"><h2 id="adding-a-section">Adding a section</h2><a class="sl-anchor-link" href="#adding-a-section"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Adding a section”</span></a></div> <ol> <li> <p>Add its copy to the page’s file, for example <code dir="auto">src/content/pages/home.json</code>:</p> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="json"><code><div class="ec-line"><div class="code"><span style="--0:#9ECBFF;--1:#032F62">"areas"</span><span style="--0:#E1E4E8;--1:#24292E">: { </span><span style="--0:#79B8FF;--1:#005CC5">"label"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Neighbourhoods"</span><span style="--0:#E1E4E8;--1:#24292E">, </span><span style="--0:#79B8FF;--1:#005CC5">"title"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Where We Work"</span><span style="--0:#E1E4E8;--1:#24292E">, </span><span style="--0:#79B8FF;--1:#005CC5">"text"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Five boroughs, one team."</span><span style="--0:#E1E4E8;--1:#24292E"> }</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code=""areas": { "label": "Neighbourhoods", "title": "Where We Work", "text": "Five boroughs, one team." }"><div></div></button></div></figure></div> </li> <li> <p>Create <code dir="auto">src/components/sections/Areas.astro</code>:</p> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="astro"><code><div class="ec-line"><div class="code"><span style="--0:#99A0A6;--1:#616972">---</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> Section </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../../design-system/components/layout/Section.astro"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> { text } </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../../design-system/tokens/text"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> { cn } </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../../design-system/utils/cn"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"> </div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">const</span><span style="--0:#E1E4E8;--1:#24292E"> { </span><span style="--0:#79B8FF;--1:#005CC5">label</span><span style="--0:#E1E4E8;--1:#24292E">, </span><span style="--0:#79B8FF;--1:#005CC5">title</span><span style="--0:#E1E4E8;--1:#24292E">, </span><span style="--0:#79B8FF;--1:#005CC5">intro</span><span style="--0:#E1E4E8;--1:#24292E"> } </span><span style="--0:#F97583;--1:#BF3441">=</span><span style="--0:#E1E4E8;--1:#24292E"> Astro.props;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#99A0A6;--1:#616972">---</span></div></div><div class="ec-line"><div class="code"> </div></div><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#79B8FF;--1:#005CC5">Section</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">bordered</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">labelledBy</span><span style="--0:#E1E4E8;--1:#24292E">=</span><span style="--0:#9ECBFF;--1:#032F62">"areas-title"</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#85E89D;--1:#1E7734">p</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">={</span><span style="--0:#B392F0;--1:#6F42C1">cn</span><span style="--0:#E1E4E8;--1:#24292E">(text.label, </span><span style="--0:#9ECBFF;--1:#032F62">"text-accent"</span><span style="--0:#E1E4E8;--1:#24292E">)}>{label}</</span><span style="--0:#85E89D;--1:#1E7734">p</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#85E89D;--1:#1E7734">h2</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">id</span><span style="--0:#E1E4E8;--1:#24292E">=</span><span style="--0:#9ECBFF;--1:#032F62">"areas-title"</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">={text.h2}>{title}</</span><span style="--0:#85E89D;--1:#1E7734">h2</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#85E89D;--1:#1E7734">p</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">={</span><span style="--0:#B392F0;--1:#6F42C1">cn</span><span style="--0:#E1E4E8;--1:#24292E">(text.body, </span><span style="--0:#9ECBFF;--1:#032F62">"text-soft"</span><span style="--0:#E1E4E8;--1:#24292E">)}>{intro}</</span><span style="--0:#85E89D;--1:#1E7734">p</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E"></</span><span style="--0:#79B8FF;--1:#005CC5">Section</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="---import Section from "../../design-system/components/layout/Section.astro";import { text } from "../../design-system/tokens/text";import { cn } from "../../design-system/utils/cn";const { label, title, intro } = Astro.props;---<Section bordered labelledBy="areas-title"> <p class={cn(text.label, "text-accent")}>{label}</p> <h2 id="areas-title" class={text.h2}>{title}</h2> <p class={cn(text.body, "text-soft")}>{intro}</p></Section>"><div></div></button></div></figure></div> </li> <li> <p>Import it in <code dir="auto">src/pages/index.astro</code> and put <code dir="auto"><Areas label={home.areas.label} title={home.areas.title} intro={home.areas.text} /></code> where it belongs.</p> </li> <li> <p>To link it from the header, give the <code dir="auto">Section</code> an <code dir="auto">id</code> and add <code dir="auto">{ "label": "Areas", "href": "/#areas" }</code> to <code dir="auto">navigation</code> in <code dir="auto">src/content/site.json</code>. The header holds four links and two buttons on laptops: with a fifth link, check it at 1200 px.</p> </li> </ol> <div class="sl-heading-wrapper level-h2"><h2 id="adding-a-page">Adding a page</h2><a class="sl-anchor-link" href="#adding-a-page"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Adding a page”</span></a></div> <ol> <li> <p>Add the URL to <code dir="auto">src/content/routes.ts</code>: <code dir="auto">services: "/services",</code>.</p> </li> <li> <p>Add its copy to <code dir="auto">src/content/pages/services.json</code>:</p> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="json"><code><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E">{</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#79B8FF;--1:#005CC5">"meta"</span><span style="--0:#E1E4E8;--1:#24292E">: {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#79B8FF;--1:#005CC5">"title"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Services"</span><span style="--0:#E1E4E8;--1:#24292E">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#79B8FF;--1:#005CC5">"description"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Buying, selling, renting and valuing property with Goeboek: what we do for you at every step of the way."</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E">},</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#79B8FF;--1:#005CC5">"title"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Our Services"</span><span style="--0:#E1E4E8;--1:#24292E">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#79B8FF;--1:#005CC5">"text"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"From the first viewing to the keys in your hand."</span></div></div><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E">}</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="{ "meta": { "title": "Services", "description": "Buying, selling, renting and valuing property with Goeboek: what we do for you at every step of the way." }, "title": "Our Services", "text": "From the first viewing to the keys in your hand."}"><div></div></button></div></figure></div> </li> <li> <p>Create <code dir="auto">src/pages/services.astro</code>:</p> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="astro"><code><div class="ec-line"><div class="code"><span style="--0:#99A0A6;--1:#616972">---</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> Section </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../design-system/components/layout/Section.astro"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> { text } </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../design-system/tokens/text"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> { cn } </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../design-system/utils/cn"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> page </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../content/pages/services.json"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">import</span><span style="--0:#E1E4E8;--1:#24292E"> Layout </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../layouts/Layout.astro"</span><span style="--0:#E1E4E8;--1:#24292E">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#99A0A6;--1:#616972">---</span></div></div><div class="ec-line"><div class="code"> </div></div><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#79B8FF;--1:#005CC5">Layout</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">title</span><span style="--0:#E1E4E8;--1:#24292E">={page.meta.title} </span><span style="--0:#B392F0;--1:#6F42C1">description</span><span style="--0:#E1E4E8;--1:#24292E">={page.meta.description}></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#85E89D;--1:#1E7734">main</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#79B8FF;--1:#005CC5">Section</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">labelledBy</span><span style="--0:#E1E4E8;--1:#24292E">=</span><span style="--0:#9ECBFF;--1:#032F62">"services-title"</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#85E89D;--1:#1E7734">h1</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">id</span><span style="--0:#E1E4E8;--1:#24292E">=</span><span style="--0:#9ECBFF;--1:#032F62">"services-title"</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">={text.number}>{page.title}</</span><span style="--0:#85E89D;--1:#1E7734">h1</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"><</span><span style="--0:#85E89D;--1:#1E7734">p</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">={</span><span style="--0:#B392F0;--1:#6F42C1">cn</span><span style="--0:#E1E4E8;--1:#24292E">(text.large, </span><span style="--0:#9ECBFF;--1:#032F62">"text-soft"</span><span style="--0:#E1E4E8;--1:#24292E">)}>{page.text}</</span><span style="--0:#85E89D;--1:#1E7734">p</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"></</span><span style="--0:#79B8FF;--1:#005CC5">Section</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#E1E4E8;--1:#24292E"> </span></span><span style="--0:#E1E4E8;--1:#24292E"></</span><span style="--0:#85E89D;--1:#1E7734">main</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E"></</span><span style="--0:#79B8FF;--1:#005CC5">Layout</span><span style="--0:#E1E4E8;--1:#24292E">></span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="---import Section from "../design-system/components/layout/Section.astro";import { text } from "../design-system/tokens/text";import { cn } from "../design-system/utils/cn";import page from "../content/pages/services.json";import Layout from "../layouts/Layout.astro";---<Layout title={page.meta.title} description={page.meta.description}> <main> <Section labelledBy="services-title"> <h1 id="services-title" class={text.number}>{page.title}</h1> <p class={cn(text.large, "text-soft")}>{page.text}</p> </Section> </main></Layout>"><div></div></button></div></figure></div> <p><code dir="auto">Layout</code> adds the header and the footer around your <code dir="auto"><main></code>. Give every page one <code dir="auto"><h1></code>.</p> </li> <li> <p>Link to it: add <code dir="auto">{ "label": "Services", "href": "/services" }</code> to <code dir="auto">navigation</code> (or a footer column) in <code dir="auto">src/content/site.json</code>.</p> </li> <li> <p>Add <code dir="auto">routes.services</code> to the <code dir="auto">paths</code> list in <code dir="auto">src/pages/sitemap.xml.ts</code>.</p> </li> </ol> <div class="sl-heading-wrapper level-h2"><h2 id="removing-a-page">Removing a page</h2><a class="sl-anchor-link" href="#removing-a-page"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Removing a page”</span></a></div> <p>A property, an agent, a location, a category or a post: delete its entry in the collection (<a href="/docs/goeboek/astro/content#removing-an-item">Editing the content</a>). A fixed page: delete its file under <code dir="auto">src/pages/</code>, the links to it in <code dir="auto">site.json</code> and the copy, the route in <code dir="auto">routes.ts</code> and its line in <code dir="auto">src/pages/sitemap.xml.ts</code>. <code dir="auto">npm run check</code> then tells you about anything still using the route through <code dir="auto">routes</code>. Removing Add property or a thank-you page means the form that leads there needs another <code dir="auto">redirect</code> (<a href="/docs/goeboek/astro/forms#changing-the-forms">Forms</a>).</p> <div class="sl-heading-wrapper level-h2"><h2 id="pages-built-from-a-collection">Pages built from a collection</h2><a class="sl-anchor-link" href="#pages-built-from-a-collection"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Pages built from a collection”</span></a></div> <p><code dir="auto">src/pages/property/[slug].astro</code> builds one page per property:</p> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="ts"><code><div class="ec-line"><div class="code"><span style="--0:#F97583;--1:#BF3441">export</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#F97583;--1:#BF3441">async</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#F97583;--1:#BF3441">function</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">getStaticPaths</span><span style="--0:#E1E4E8;--1:#24292E">() {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#F97583;--1:#BF3441">return</span><span style="--0:#E1E4E8;--1:#24292E"> (</span><span style="--0:#F97583;--1:#BF3441">await</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">getProperties</span><span style="--0:#E1E4E8;--1:#24292E">()).</span><span style="--0:#B392F0;--1:#6F42C1">map</span><span style="--0:#E1E4E8;--1:#24292E">((</span><span style="--0:#FFAB70;--1:#AE4B07">item</span><span style="--0:#E1E4E8;--1:#24292E">) </span><span style="--0:#F97583;--1:#BF3441">=></span><span style="--0:#E1E4E8;--1:#24292E"> ({ params: { slug: item.slug }, props: { item } }));</span></div></div><div class="ec-line"><div class="code"><span style="--0:#E1E4E8;--1:#24292E">}</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="export async function getStaticPaths() { return (await getProperties()).map((item) => ({ params: { slug: item.slug }, props: { item } }));}"><div></div></button></div></figure></div> <p>Add a property to <code dir="auto">src/content/collections/properties.json</code>, and its page, its cards, its place in the listings and its sitemap entry appear on the next build; any other address under <code dir="auto">/property/</code> is a 404. The agents, locations, categories and posts work the same way, and the two Type pages are built from the list <code dir="auto">["sell", "rent"]</code> in <code dir="auto">src/pages/type/[type].astro</code>.</p> <div class="sl-heading-wrapper level-h2"><h2 id="the-404-page">The 404 page</h2><a class="sl-anchor-link" href="#the-404-page"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “The 404 page”</span></a></div> <p><code dir="auto">src/pages/404.astro</code>, with its copy in <code dir="auto">src/content/pages/not-found.json</code>. It is built as <code dir="auto">404.html</code>, which hosts serve for any unknown address, with a 404 status; it is <code dir="auto">noindex, nofollow</code>, like the style guide. The “404” is sized to a share of the column’s width (as the original design does).</p> <div class="sl-heading-wrapper level-h2"><h2 id="the-header">The header</h2><a class="sl-anchor-link" href="#the-header"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “The header”</span></a></div> <ul> <li><strong>Sticky at the top of every page, and the same everywhere:</strong> the logo, the four links, “Add Property” and “Contact us” in one row from 1200 px; on tablets the links are centred and “Contact us” is left out.</li> <li><strong>Phones:</strong> the small logo and the “Menu” button; it opens the links under the logo row with the two buttons on the last row, and turns into “Close”. The logo and every link close it (<code dir="auto">src/components/site/header.ts</code>).</li> <li><strong>The links</strong> are <code dir="auto">navigation</code> in <code dir="auto">src/content/site.json</code>, the buttons <code dir="auto">headerActions</code>.</li> </ul> <div class="sl-heading-wrapper level-h2"><h2 id="the-footer">The footer</h2><a class="sl-anchor-link" href="#the-footer"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “The footer”</span></a></div> <p><code dir="auto">src/components/site/Footer.astro</code>, on every page: the logo, the text and “Contact Us”; the Categories and Links columns (<code dir="auto">footer.columns</code>) and Contact Us (the address, phones and e-mail from <code dir="auto">contact</code>); then a line, the copyright with the current year and “Follow us:” with the social links. Its texts are <code dir="auto">footer</code>, <code dir="auto">contact</code> and <code dir="auto">socials</code> in <code dir="auto">src/content/site.json</code>.</p> <div class="sl-heading-wrapper level-h2"><h2 id="search-engines">Search engines</h2><a class="sl-anchor-link" href="#search-engines"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Search engines”</span></a></div> <ul> <li><strong>Sitemap:</strong> <code dir="auto">src/pages/sitemap.xml.ts</code> builds <code dir="auto">sitemap.xml</code> from <code dir="auto">routes.ts</code> and the collections: Home, the listings, every property, the blog and its posts, About, Contact, Add property and the two thank-you pages: 55 addresses in the demo. The three empty default listings, the 404 page and the style guide are left out.</li> <li><strong>Robots:</strong> <code dir="auto">src/pages/robots.txt.ts</code> builds <code dir="auto">robots.txt</code>, which allows everything and points at the sitemap. Both use <code dir="auto">site.url</code>, so set your domain before publishing.</li> <li><strong>Per page:</strong> every indexable page gets a title, a description, a canonical link and an <code dir="auto">og:url</code> from <code dir="auto">Layout</code> (with <code dir="auto">src/lib/meta.ts</code>). Home takes <code dir="auto">site.title</code> and <code dir="auto">site.description</code>; the other pages their <code dir="auto">meta</code> (with <code dir="auto">{name}</code> for a location, category or agent). A property’s and a post’s description is its <code dir="auto">excerpt</code>, cut at 160 characters; properties, posts and agents with a photo share it as a large card, and a post is an <code dir="auto">article</code> with its date as <code dir="auto">article:published_time</code>. Home and the other pages have no share image, as in the original design, and share their title and description as a small card. Every page links the browser icon and the home-screen icon. A title that would be longer than 60 characters with <code dir="auto"> | Goeboek</code> appended is shown without the suffix.</li> <li><strong>One <code dir="auto"><h1></code> per page:</strong> the hero’s title on Home, the listing’s title, a property’s or a post’s title, the page title of the other pages.</li> <li><strong>Not indexed:</strong> the style guide and the 404 page (<code dir="auto">noindex, nofollow</code>), the three empty default listings (<code dir="auto">noindex, follow</code>).</li> </ul> </div><footer class="sl-flex astro-ddtxxk7k"><div class="meta sl-flex astro-ddtxxk7k"></div><div class="pagination-links print:hidden astro-b5raizh3" dir="ltr"><a href="/docs/goeboek/astro/design" rel="prev" class="astro-b5raizh3"><svg aria-hidden="true" class="astro-b5raizh3 astro-hkc32dio" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-b5raizh3">Previous<br class="astro-b5raizh3"><span class="link-title astro-b5raizh3">Design</span></span></a><a href="/docs/goeboek/astro/forms" rel="next" class="astro-b5raizh3"><svg aria-hidden="true" class="astro-b5raizh3 astro-hkc32dio" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-b5raizh3">Next<br class="astro-b5raizh3"><span class="link-title astro-b5raizh3">Forms</span></span></a></div></footer><footer class="fb-footer not-content"><p>© 2026 Framebrick by Marcframe. All rights reserved.</p><ul><li><a href="/support">Support</a></li><li><a href="/docs">Docs</a></li><li><a href="/license">License</a></li><li><a href="/legal/terms">Terms of service</a></li><li><a href="/legal/refund-policy">Refund policy</a></li><li><a href="/legal/privacy-policy">Privacy policy</a></li><li><a href="/legal/cookie-policy">Cookie policy</a></li><li><a href="https://x.com/hi_marcframe" target="_blank" rel="noopener">X (Twitter)</a></li></ul></footer></div></div></main></div></div></div></div></body></html>