Build a blog with Pages
This is the tr-blog recipe exactly as the Typeroll MCP server gives it to agents through list_skills and read_skill. See Skills and recipes for how agents load recipes.
Every article is a Page. A Content type supplies its extra fields, URL pattern and default template. Do not create a separate item store or generate listing HTML by hand.
- Read
get_site_capabilities,list_block_types,list_content_typesandlist_page_templates. For a substantial change, create a site version and pass its ID asversionon every supported operation. - Create an editable shared template:
{ "name": "article-layout", "label": "Article", "starter": "article", "status": "published" }Send it to create_page_template. Use block tools with
target: { kind: "template", id: "article-layout" } to refine the layout.
- Call
create_content_type:
{ "name": "articles", "label_singular": "Article", "label_plural": "Articles", "route_template": "/articles/{slug}", "template": "article-layout", "sort_field": "date_published", "sort_dir": "desc", "fields": [ { "name": "excerpt", "label": "Summary", "type": "textarea" }, { "name": "featured_image", "label": "Cover image", "type": "image" } ]}Title, slug, author, date, SEO, status and body are built-in Page values. Keep
only custom values in fields.
- Call
create_pagefor each article with itstitle,slug,content_type: "articles",status,date_published,fieldsandblocks. Use native heading, prose, image, list and table blocks. Store its returned Page ID; use it for every later operation. - Create the archive as another Page with
core/page_list, usingdata: { content_type: "articles", sort_by: "date_published", sort_order: "desc", paginate: 10 }. A homepage teaser can uselimit: 6instead. Both resolve saved Pages at render time; adding an article needs no listing regeneration. - Link to the archive from navigation. Preview representative articles and
the archive on desktop and mobile with
get_preview_link page_id=.... - Save any working copies before publication.
update_pageand block edits needsave: trueorcommit_working_copy; new Pages and template definitions are saved immediately. Deploy only within the user’s authorized scope and verify the returned job and public URL.
Use the organization’s connected media storage before importing remote images. Do not hardcode a Typeroll media hostname. Use the returned media URL.
A published Page with complete route tokens becomes one static detail page. Draft/review Pages stay private. Unlisted Pages have a public URL but are omitted from listings and search indexes. The selected version’s robots policy applies.