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/ and the home Page, then preview them. The pricing section reads the published Offers, so no price is typed twice.
Steps
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 } ---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"]} /> To see it, open the preview address the dev server prints for the save.
To read what agents read, fetch the Site's machine files from the preview:
/llms.txt,/agents.jsonand/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/.
Next steps
- Tutorial 7 gives managers an App to work in.
- Sites and pages: the full contracts.
- Build a custom component: a Component of Leaseline's own.