Add a page
From logging in to a new page readers can see.
- 1. Log in. POST session login. haxcms-site-editor-ui appears: the top bar with Add page, Edit, Outline designer and the dashboard. (1. Log in, POST /system/api/v1/session/login, HAX editor)
- 2. Add page. Choose Add page from the top bar, or ask Merlin. Pick a title, where it goes, and what to start from: blank, a template, a clone, or an imported file. (2. Add page, Merlin, Importers, Skeletons)
- 3. The item is created. POST /x/api/v1/items. The backend writes pages/<id>/index.html and appends the item (id, parent, order, slug, location) to site.json. (3. The item is created, POST /x/api/v1/items, JSON Outline Schema, pages/<id>/index.html)
- 4. The store updates. haxcms-site-store refreshes the manifest; menus and breadcrumbs show the page and the router moves to its slug. (4. The store updates, site.json)
- 5. Write. Edit mode opens hax-body with the blocks the app store allows for this site. Type / for Merlin's slash commands, drop a file or paste a link to import. (5. Write, HAX editor, Web components, App Store schema, Importers)
- 6. Save. PATCH /x/api/v1/content/{id} saves the HTML to pages/<id>/index.html; PATCH /x/api/v1/items/{id} saves title, published state and metadata to site.json. Git keeps a revision. (6. Save, PATCH /x/api/v1/content/{idOrSlug}, PATCH /x/api/v1/items/{idOrSlug})
- 7. Readers see it. The page renders through the same load path as every other page; sitemap, search index and feeds regenerate. (7. Readers see it, sitemap.xml, robots.txt, rss.xml, lunrSearchIndex.json)
- Add a page: the whole path. (Add a page, 1. Log in, 2. Add page, 3. The item is created, 4. The store updates, 5. Write, 6. Save, 7. Readers see it)