Skip to content
Sign inJoin waitlist

Pages and sections — Brickfolio Astro

A page is a small file that picks sections and hands them content. src/pages/index.astro is the whole of Home: the profile card, then the sections in the order they appear, then the footer.

<Layout title={siteContent.site.title} absolute description={siteContent.site.description}>
…
<main class="flex flex-col gap-20 lg:contents">
<Profile class="… lg:sticky lg:top-[150px] lg:row-span-11 …" />
<Projects projects={projects} class={column} />
<Services services={services} class={column} />
<ServicesCta class={column} />
<Testimonials class={column} />
<Experience class={column} />
<Clients class={column} />
<Blog posts={posts} class={column} />
<Contact class={column} />
<Faq class={column} />
<Divider class={column} />
</main>
<Footer copyrightInSidebar class={column} />
…
</Layout>
  • Layout (src/layouts/Layout.astro) gives a page its <head> — browser title, description, canonical link, share card and icons — and the sticky header. title is shown as “ | Brickfolio” (<code dir="auto">absolute</code> keeps it whole).</li> <li><code dir="auto">getProjects()</code>, <code dir="auto">getServices()</code> and <code dir="auto">getPosts()</code> read the collections (see <a href="/docs/brickfolio/astro/content">Editing the content</a>).</li> <li>Each section reads its own copy from <code dir="auto">src/content/pages/home.json</code>, so the page passes only the collections.</li> <li>From 1000 px up, <code dir="auto"><main></code> is <code dir="auto">display: contents</code>: the profile card takes the first column of a grid and sticks (<code dir="auto">lg:sticky</code>), the sections and the footer take the second (<code dir="auto">column</code>, <code dir="auto">lg:col-start-2</code>).</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>4 kinds of page and 19 addresses in the demo. 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>every project (four at a time), every service, every post (four at a time, newest first)</td> </tr> <tr> <td>Project</td> <td><code dir="auto">/project/<slug></code></td> <td><code dir="auto">src/pages/project/[slug].astro</code></td> <td><code dir="auto">project.json</code></td> <td>one project, then three other projects</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, then up to three others of its category</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>All 19 addresses of the demo (the sitemap lists the same):</p> <table> <thead> <tr> <th>Page</th> <th>Addresses</th> </tr> </thead> <tbody> <tr> <td>Home (1)</td> <td><code dir="auto">/</code></td> </tr> <tr> <td>Projects (6)</td> <td><code dir="auto">/project/ecoshop-sustainable-e-commerce-platform</code>, <code dir="auto">/project/greenthumb-gardening-app</code>, <code dir="auto">/project/foodiefiesta-restaurant-reservation-system</code>, <code dir="auto">/project/techhub-online-learning-platform</code>, <code dir="auto">/project/cityguide-travel-website</code>, <code dir="auto">/project/healthtrack-fitness-app</code></td> </tr> <tr> <td>Posts (12)</td> <td><code dir="auto">/blog/the-role-of-prototyping-in-product-design</code>, <code dir="auto">/blog/designing-for-user-experience-key-considerations</code>, <code dir="auto">/blog/the-future-of-product-design-trends-to-watch-in-2024</code>, <code dir="auto">/blog/10-essential-web-design-principles-for-2024</code>, <code dir="auto">/blog/responsive-web-design-best-practices-and-tips</code>, <code dir="auto">/blog/creating-high-converting-landing-pages</code>, <code dir="auto">/blog/how-to-create-user-centric-products-a-step-by-step-guide</code>, <code dir="auto">/blog/conducting-effective-user-research-for-better-ui-design</code>, <code dir="auto">/blog/sustainable-product-design-practices-and-benefits</code>, <code dir="auto">/blog/ui-design-trends-to-elevate-your-digital-products</code>, <code dir="auto">/blog/the-impact-of-microinteractions-on-ux</code>, <code dir="auto">/blog/the-importance-of-ux-in-modern-web-design</code></td> </tr> </tbody> </table> <p>There is no page that lists every project or every post: Home does, four at a time. The style guide (<code dir="auto">/style-guide</code>, <code dir="auto">src/pages/style-guide.astro</code>) and the 404 page are pages too, but they are not in the sitemap, are 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">project/ecoshop-….html</code>, served at <code dir="auto">/project/ecoshop-…</code> (<a href="/docs/brickfolio/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. Each takes its copy from the page file it belongs to.</p> <table> <thead> <tr> <th>Section</th> <th>Used on</th> <th>Copy</th> </tr> </thead> <tbody> <tr> <td><code dir="auto">Profile</code> (the photo, the greeting, the rotating roles, the headline, the text, the social links; the copyright from 1440 px)</td> <td>Home</td> <td><code dir="auto">home.profile</code>, <code dir="auto">social</code> and <code dir="auto">footer.copyright</code> in <code dir="auto">site.json</code></td> </tr> <tr> <td><code dir="auto">Projects</code> (My Latest Work: the project cards, “More Projects”)</td> <td>Home</td> <td><code dir="auto">home.projects</code></td> </tr> <tr> <td><code dir="auto">Services</code> (Work with Me: the service cards)</td> <td>Home</td> <td><code dir="auto">home.services</code></td> </tr> <tr> <td><code dir="auto">ServicesCta</code> (“Can’t decide or custom request?” with “Email me” and “Contact”)</td> <td>Home</td> <td><code dir="auto">home.services.cta</code></td> </tr> <tr> <td><code dir="auto">Testimonials</code> (Trusted by Professionals: the ticker of quotes)</td> <td>Home</td> <td><code dir="auto">home.testimonials</code></td> </tr> <tr> <td><code dir="auto">Experience</code> (My Experiences: the cards, “Download CV”, “Contact Me”)</td> <td>Home</td> <td><code dir="auto">home.experience</code></td> </tr> <tr> <td><code dir="auto">Clients</code> (My Awesome Clients: the logo ticker)</td> <td>Home</td> <td><code dir="auto">home.clients</code></td> </tr> <tr> <td><code dir="auto">Blog</code> (Latest Articles & Publications: the post cards, “More Posts”)</td> <td>Home</td> <td><code dir="auto">home.blog</code></td> </tr> <tr> <td><code dir="auto">Contact</code> (Let’s Connect: the form)</td> <td>Home</td> <td><code dir="auto">home.contact</code></td> </tr> <tr> <td><code dir="auto">Faq</code> (Questions? Answers)</td> <td>Home</td> <td><code dir="auto">home.faq</code></td> </tr> <tr> <td><code dir="auto">ProjectArticle</code> (the title, the facts, the cover, the overview, the gallery, the highlights)</td> <td>Project</td> <td><code dir="auto">project.json</code> → <code dir="auto">labels</code></td> </tr> <tr> <td><code dir="auto">PostArticle</code> (the title, the date and category, the cover, the text)</td> <td>Blog post</td> <td><code dir="auto">post.json</code> → <code dir="auto">labels</code></td> </tr> <tr> <td><code dir="auto">MoreItems</code> (“More Projects” with <code dir="auto">projects</code>, “More Posts” with <code dir="auto">posts</code>)</td> <td>Project, Blog post</td> <td><code dir="auto">more</code> in <code dir="auto">project.json</code> / <code dir="auto">post.json</code></td> </tr> </tbody> </table> <p>The section titles with their accent word are <code dir="auto">SectionTitle</code>, the lines between blocks <code dir="auto">Divider</code>, helpers of the design system, not sections.</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> <p>The header’s links lead to Home’s sections; the logo leads to the top of Home. The other pages are reached like this:</p> <table> <thead> <tr> <th>Page</th> <th>Linked from</th> </tr> </thead> <tbody> <tr> <td>Home</td> <td>The logo, the header’s links (<code dir="auto">/#project</code>, <code dir="auto">/#service</code>, <code dir="auto">/#resume</code>, <code dir="auto">/#blog</code>, <code dir="auto">/#contact</code>), the close button of a project or post page (back to its section), “Back to Homepage” (404)</td> </tr> <tr> <td>A project</td> <td>Its card: My Latest Work on Home, “More Projects” under another project</td> </tr> <tr> <td>A post</td> <td>Its card: Latest Articles & Publications on Home, “More Posts” under another post</td> </tr> <tr> <td><code dir="auto">/cv.pdf</code></td> <td>“Download CV” in My Experiences</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 page type 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 profile card is the 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>Eleven blocks in <code dir="auto"><main></code>: the profile card in the sidebar, then My Latest Work, Work with Me, the call to get in touch, the testimonials, the experience, the client logos, the articles, the contact form, the questions and a line, and the footer (the newsletter box and the copyright line) under them. All the copy is in <code dir="auto">src/content/pages/home.json</code>, one field per section (<a href="/docs/brickfolio/astro/content#home-section-by-section">Editing the content</a>).</p> <p><img alt="Home: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="5066" src="/docs/_astro/map-home.CEp86BkD_Z1m05wk.webp"></p> <div class="sl-heading-wrapper level-h3"><h3 id="project">Project</h3><a class="sl-anchor-link" href="#project"><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 “Project”</span></a></div> <p>Three blocks: the article (the title, Date, Service and Client, the cover, Project Overview, two gallery images, Key Highlights, the third image), a line, and More Projects (the first three other projects of <code dir="auto">projects.json</code>; two below 1000 px). Everything but the labels (<code dir="auto">src/content/pages/project.json</code>) is the project’s own entry in <code dir="auto">src/content/collections/projects.json</code>. The round close button stays at the bottom of the window and leads back to My Latest Work.</p> <p><img alt="Project: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="2364" src="/docs/_astro/map-project.BeFaWzus_24y6PX.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>Three blocks: the article (the title, Date and Category, the cover and the text), a line, and More Posts (up to three other posts of the same category, newest first), left out with its line when there is none. Everything but the labels (<code dir="auto">src/content/pages/post.json</code>) is the post’s entry in <code dir="auto">src/content/collections/posts.json</code>. The close button leads back to the articles on Home.</p> <p><img alt="Blog post: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="2590" src="/docs/_astro/map-post.B8qk-p_i_mvjlO.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>Two blocks in the middle of a screen-high space: “404”, the message and the line under it; “Back to Homepage”. The words are in <code dir="auto">src/content/pages/not-found.json</code>. The page has no footer, as in the original design.</p> <p><img alt="404: sections and the files behind them" loading="lazy" decoding="async" width="1200" height="616" src="/docs/_astro/map-not-found.C1Y6wSjD_24NK1X.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 <code dir="auto">src/pages/index.astro</code>, or delete one. To take the testimonials off Home, delete <code dir="auto"><Testimonials … /></code>; its copy in <code dir="auto">home.json</code> can stay. Two things to keep in step:</p> <ul> <li><strong>The anchors.</strong> The header’s links point at the sections’ <code dir="auto">id</code>s (<code dir="auto">project</code>, <code dir="auto">service</code>, <code dir="auto">resume</code>, <code dir="auto">blog</code>, <code dir="auto">contact</code>). When you remove a section with an anchor, remove its link from <code dir="auto">navigation</code> in <code dir="auto">src/content/site.json</code>; the “Contact” and “Hire Me” buttons and the close buttons point at <code dir="auto">#contact</code>, <code dir="auto">#project</code> and <code dir="auto">#blog</code> too.</li> <li><strong>The sidebar’s rows.</strong> From 1000 px the profile card spans the rows of the grid: <code dir="auto">lg:row-span-11</code> on <code dir="auto"><Profile></code> counts the blocks of the column (nine sections, the line and the footer). With a block more or less, change the number, or the card stops sticking before the end of the page.</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 <code dir="auto">src/content/pages/home.json</code>, with an <code dir="auto">id</code> if the header should link to it:</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">"awards"</span><span style="--0:#E1E4E8;--1:#24292E">: { </span><span style="--0:#79B8FF;--1:#005CC5">"id"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"awards"</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">"Awards and"</span><span style="--0:#E1E4E8;--1:#24292E">, </span><span style="--0:#79B8FF;--1:#005CC5">"accent"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"Mentions"</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">"A few moments I am proud of."</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=""awards": { "id": "awards", "title": "Awards and", "accent": "Mentions", "text": "A few moments I am proud of." }"><div></div></button></div></figure></div> </li> <li> <p>Create <code dir="auto">src/components/sections/Awards.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"> SectionTitle </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/SectionTitle.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"> home </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../../content/pages/home.json"</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:#FFAB70;--1:#AE4B07">class</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#79B8FF;--1:#005CC5">className</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:#F97583;--1:#BF3441">const</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#79B8FF;--1:#005CC5">copy</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#F97583;--1:#BF3441">=</span><span style="--0:#E1E4E8;--1:#24292E"> home.awards;</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">id</span><span style="--0:#E1E4E8;--1:#24292E">={copy.id} </span><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">={className}></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">SectionTitle</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#B392F0;--1:#6F42C1">title</span><span style="--0:#E1E4E8;--1:#24292E">={copy.title} </span><span style="--0:#B392F0;--1:#6F42C1">accent</span><span style="--0:#E1E4E8;--1:#24292E">={copy.accent} </span><span style="--0:#B392F0;--1:#6F42C1">text</span><span style="--0:#E1E4E8;--1:#24292E">={copy.text} /></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 SectionTitle from "../../design-system/components/layout/SectionTitle.astro";import home from "../../content/pages/home.json";const { class: className } = Astro.props;const copy = home.awards;---<Section id={copy.id} class={className}> <SectionTitle title={copy.title} accent={copy.accent} text={copy.text} /></Section>"><div></div></button></div></figure></div> </li> <li> <p>Import it in <code dir="auto">src/pages/index.astro</code>, put <code dir="auto"><Awards class={column} /></code> where it belongs, and raise <code dir="auto">lg:row-span-11</code> to 12.</p> </li> <li> <p>To link it from the header, add <code dir="auto">{ "label": "Awards", "href": "#awards" }</code> to <code dir="auto">navigation</code> in <code dir="auto">src/content/site.json</code>. The header holds five links on laptops: with a sixth, check it at 1000 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">about: "/about",</code>.</p> </li> <li> <p>Add its copy to <code dir="auto">src/content/pages/about.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">"title"</span><span style="--0:#E1E4E8;--1:#24292E">: </span><span style="--0:#9ECBFF;--1:#032F62">"About me"</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">"Who I am, how I work and what I can do for your product: a short story of ten years in design."</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">"A longer introduction than the profile card has room for."</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="{ "title": "About me", "description": "Who I am, how I work and what I can do for your product: a short story of ten years in design.", "text": "A longer introduction than the profile card has room for."}"><div></div></button></div></figure></div> </li> <li> <p>Create <code dir="auto">src/pages/about.astro</code>, in the column the project and post pages use (it adds the footer under your <code dir="auto"><main></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"> PageColumn </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../components/site/PageColumn.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"> about </span><span style="--0:#F97583;--1:#BF3441">from</span><span style="--0:#E1E4E8;--1:#24292E"> </span><span style="--0:#9ECBFF;--1:#032F62">"../content/pages/about.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"> { 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"> 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">={about.title} </span><span style="--0:#B392F0;--1:#6F42C1">description</span><span style="--0:#E1E4E8;--1:#24292E">={about.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:#79B8FF;--1:#005CC5">PageColumn</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><span style="--0:#B392F0;--1:#6F42C1">class</span><span style="--0:#E1E4E8;--1:#24292E">=</span><span style="--0:#9ECBFF;--1:#032F62">"flex flex-col gap-5"</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">class</span><span style="--0:#E1E4E8;--1:#24292E">={</span><span style="--0:#B392F0;--1:#6F42C1">cn</span><span style="--0:#E1E4E8;--1:#24292E">(text.title, </span><span style="--0:#9ECBFF;--1:#032F62">"text-light"</span><span style="--0:#E1E4E8;--1:#24292E">)}>{about.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.body, </span><span style="--0:#9ECBFF;--1:#032F62">"text-white/80"</span><span style="--0:#E1E4E8;--1:#24292E">)}>{about.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:#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">PageColumn</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 PageColumn from "../components/site/PageColumn.astro";import about from "../content/pages/about.json";import { text } from "../design-system/tokens/text";import { cn } from "../design-system/utils/cn";import Layout from "../layouts/Layout.astro";---<Layout title={about.title} description={about.description}> <PageColumn> <main class="flex flex-col gap-5"> <h1 class={cn(text.title, "text-light")}>{about.title}</h1> <p class={cn(text.body, "text-white/80")}>{about.text}</p> </main> </PageColumn></Layout>"><div></div></button></div></figure></div> <p>Give every page one <code dir="auto"><h1></code>.</p> </li> <li> <p>Link to it: add <code dir="auto">{ "label": "About", "href": "/about" }</code> to <code dir="auto">navigation</code> in <code dir="auto">src/content/site.json</code>.</p> </li> <li> <p>Add <code dir="auto">routes.about</code> to the <code dir="auto">paths</code> list in <code dir="auto">src/pages/sitemap.xml.ts</code>, next to <code dir="auto">routes.home</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 project or a post: delete its entry in the collection. A page you added: delete its file under <code dir="auto">src/pages/</code>, its entry in <code dir="auto">navigation</code>, 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>.</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/project/[slug].astro</code> builds one page per project:</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">getProjects</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">project</span><span style="--0:#E1E4E8;--1:#24292E">) </span><span style="--0:#F97583;--1:#BF3441">=></span><span style="--0:#E1E4E8;--1:#24292E"> ({ params: { slug: project.slug }, props: { project } }));</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 getProjects()).map((project) => ({ params: { slug: project.slug }, props: { project } }));}"><div></div></button></div></figure></div> <p>Add a project to <code dir="auto">src/content/collections/projects.json</code>, and its page, its card and its sitemap entry appear on the next build; any other address under <code dir="auto">/project/</code> is a 404. The posts work the same way (<code dir="auto">src/pages/blog/[slug].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</code>, like the style guide. Its three lines are sized to fit the width of the column (as the original design does), for the demo’s words: with a much longer message, change the sizes in <code dir="auto">fit</code> at the top of the file.</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, then on tablets and up the five links and the “Hire Me” pill, over a line in White 10 %.</li> <li><strong>Phones:</strong> the logo and the “Menu” button; it opens the links and the pill under the bar and turns into “Close”. A link closes 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 pill <code dir="auto">button</code>. They underline in Light on hover.</li> </ul> <div class="sl-heading-wrapper level-h2"><h2 id="the-project-and-post-pages">The project and post pages</h2><a class="sl-anchor-link" href="#the-project-and-post-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 project and post pages”</span></a></div> <p>Both are a 1000 px column (<code dir="auto">PageColumn.astro</code>) with the article, a line, “More Projects” or “More Posts” and the footer, and a round close button fixed at the bottom of the window (<code dir="auto">CloseBar.astro</code>). The close button leads back to the Home section the visitor came from (<code dir="auto">close.href</code> in <code dir="auto">project.json</code> and <code dir="auto">post.json</code>) and only it takes the pointer, so the strip under it stays clickable.</p> <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>: the newsletter box (its title, its text and the e-mail field with “Subscribe”) and the copyright line under it. On Home from 1440 px the copyright line sits at the foot of the profile card instead. Its texts are <code dir="auto">footer</code> in <code dir="auto">src/content/site.json</code>; the newsletter box is described in <a href="/docs/brickfolio/astro/forms">Forms</a>.</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, then every project and every post: 19 addresses in the demo. 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>. A project’s description is its summary, a post’s its first paragraph, each cut at 160 characters, and both share their own cover photo as a large card. Home has no share image, as in the original design, so it shares its title and description only.</li> <li><strong>One <code dir="auto"><h1></code> per page:</strong> the headline of the profile card on Home, the title of a project or a post, the 404’s message.</li> <li><strong>Not indexed:</strong> the style guide and the 404 page (<code dir="auto">noindex</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/brickfolio/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/brickfolio/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>