Guides
Pages
Load when editing a Blackbell page, translating it, importing HTML, changing site CSS or taking an edit session live.
Link to /page/<id> for a permanent address. Slugs can change. Use set_page_settings for status (draft, published/online, archived), slug, languages, search texts, share image or homepage. A draft is closed to visitors.
Use list_block_templates and add_block for editor-library texts, images, buttons and lists. For a designed free page, write HTML, CSS and JS in one block. The editor exposes each text (power-text), image (power-image) and link (power-link). Read the page-design topic with get_guide for layout and buttons.
Edit and preview
- For a named change such as “remove the closed notice”, call
find_and_editwithfind, then withchanges. No page id needed. Otherwise readget_page_outline(about 2 KB), locate lines withsearch_codeand send every change in oneedit_pagecall. Skip a dry run. Keep reads small. Reimporting a whole page for a small change loses saved texts, links and images. - Work in the hidden copy. Use
start_edit_session, or letedit_pageorfind_and_editopen it. Edits start background checks. Readcheck_edit_sessionfor problems, warnings, quality score, fixes and 390 px and 1440 px screenshots. Broken links block go live. Keep links returning 401, 403 or 429 withlink_refuses_botswarnings. Info pages (privacy, legal notice, terms, accessibility, cookies) havepage_kind: "info"and skip booking and phone checks. - Use
undo_edit_stepfor one step,undo_edit_sessionto restore the page as it was before go live, orlist_page_versionsthenrestore_page_versionfor older work. Batch repeated operations across pages in onerun_manywhen available. - Check
list_menubeforeadd_to_menu. Menu changes andpin_block(one shared block at the top and one at the bottom of every page) go live immediately. Preview and ask first.
Create or translate
- Create a draft from authored HTML with
create_page. For a file or a large page, callget_upload_link, runcurl -sS -T page.html '<upload_url>', then passupload_idtoimport_page. Use one link per file, valid for one hour. Send a revised copy of the same file to its link. Reviewsimilar_pagesand ask before keeping two pages with the same title. Reserveimport_free_pagefor a major redesign that replaces every language’s code. create-page - Read
available_localesfromget_settings. Create one page in the main language. Useadd_page_languagefor each other language with the same texts in the same order. For normal blocks, readget_page_textsthen use oneedit_pagewithlocale. Visitors switch languages on the same page. Keep language names out of titles and language prefixes out of/page/<id>links.
Style free pages and blocks
- Show the returned page titles, preview links and laptop/phone screenshots of live pages with the draft applied. By default the previews use the three most recently changed published free pages, or all if fewer. Missing title translations show as
Page <id>. Usepreview_site_cssto reread rendering status and the 390 px and 1440 px images (10–40 seconds). Use the preview URL when rendering is unavailable. Callgo_live_site_csson “good”, ordiscard_site_css_draftto drop the draft. - Write whole-document CSS using
:root,htmlandbody. In the shadow root the first two become:hostand the last becomes.bb-body.get_site_cssreturns your original rules. - For normal blocks, use
set_page_stylefor one design across blocks,set_page_cssfor page CSS andset_block_classfor a block class. For visibility use page-access-and-versions.