Skip to content

Publishing the Site

Tutorial 6 of 12 gives Leaseline its marketing Site, home page and navigation, and reads the files every Site serves to agents.

A Site is a folder of Pages, and every path is a file. Leaseline's Site sells the pro plan and serves a Markdown twin of every Page to agents.

What you build

You write sites/www/site.mdx and the home Page, then preview them. The pricing section reads the published Offers, so no price is typed twice.

Steps

Terminal4 steps
  1. To declare the Site and its navigation, write its folder file:

    sites/www/site.mdx
    ---
    domains: [leaseline.com, www.leaseline.com]
    nav:
      - { label: Pricing, path: /pricing }
      - { label: Blog, path: /blog }
      - { label: Sign in, path: /app }
    ---
  2. To write the home Page, compose it from components:

    sites/www/page.mdx
    ---
    title: Never miss a renewal
    description: Leaseline tracks every lease end date and reminds residents for you.
    ---
    <Hero heading="No renewal slips past its date" action="/checkout/pro" />
    
    Leaseline reads your rent roll, counts down to each end date, and sends the notice at 60 days.
    
    <Features items={["Rent roll import", "Notices at 60 days", "A weekly list of who has not answered"]} />
  3. To see it, open the preview address the dev server prints for the save.

  4. To read what agents read, fetch the Site's machine files from the preview: /llms.txt, /agents.json and /openapi.json.

Result

The Site serves its home Page, /pricing from the published Offers, the generated /terms and /privacy, and a Markdown twin of every Page. Routing maps each path to its file. Checkpoint leaseline@ch06 (status planned) adds sites/www/.

Next steps