Skip to content
SharpWrite
Docs menu

Page builder

Not everyone wants to connect a website to an API. Build pages from widgets, then show them on your own website or send a private link. Available on SharpWrite Cloud.

Pages and content together

Pages and content live in one place, Contents in the menu. There is no mode to choose, and you can use both on the same site:

  • Pages: you build pages from widgets and publish them in SharpWrite, then show them on your own website or share them with a private link.
  • Content: your own kinds of content, such as posts or products, which your website reads through the API.

Pages are available as JSON too, so you can also build your own site from them. Read them from the same API as everything else, with the type site-pages: GET /api/public/v1/site-pages lists the published pages, and GET /api/public/v1/site-pages/{slug} returns one. Each page holds its title, description and widgets. AI agents can read and write page drafts through MCP in the same way.

Show a page on your own website

First prove the website is yours, then paste two lines into any website, CMS or page builder that allows a script tag, and the page appears there:

HTML
<div data-sharpwrite data-page="about"></div>
<script src="https://app.sharpwritecms.com/embed.js" data-key="swk_..." async></script>
  • data-key is your site key. It goes once, on the script line, and serves every element on the page. data-page is the page address; leave it out for the homepage.
  • Add data-theme="dark" for a dark background.
  • The Pages screen in SharpWrite gives you the snippet ready to copy, with your key in it, once a page is published.
  • Verify your website first. On the Pages screen, add the address of your website (each address you use, with and without www, separately). SharpWrite gives you a short token: put it in a <meta name="sharpwrite-verify" content="..."> tag on your homepage, or in a file at /.well-known/sharpwrite.txt, then press Verify. Pages are only sent to websites that passed this check; on any other website the element shows an error instead. If you remove the proof and check again, the website is no longer verified.
  • The key is safe to put in a web page, because only your verified websites can use it. If it ever ends up somewhere it should not, press Replace key on the Pages screen: the old key stops working at once, and you paste the new snippet.
  • Only published pages appear, and visitors always get the latest published version. A draft or an unpublished edit is never shown.
  • The page is drawn inside its own sealed box, so your site's styles cannot break it and it cannot break yours. It takes its font from the surrounding page. Nothing from the page is ever run as code.
  • The element gets data-sharpwrite-state (loading, ready or error) and fires sharpwrite:loaded or sharpwrite:error. In a single-page app, call window.SharpWrite.render(element) after adding an element.
  • Prefer to draw it yourself? Read pages as JSON from the API instead. The embed address (/api/embed/{key}/{page}) is for the script and answers only verified websites.

Widgets

A page is a list of widgets that you add, fill in and reorder. Drag to reorder, or duplicate and delete a widget from its menu. A page can have up to 60 widgets.

WidgetWhat it is for
HeroHeadline, sub-headline, a button and an optional image at the top of a page
HeadingA section heading (level 2 or 3)
TextA block of paragraph text
ImageA picture from your media library with alt text and an optional caption
FeaturesA short list of up to six titled points
FAQUp to twelve questions and answers
QuoteA testimonial with author and role
Call to actionA headline, a line of text and a button
DividerSpace between sections (small, medium or large)

Buttons and links accept https://, http://, mailto: addresses, a path on your site such as /pricing, or an anchor such as #faq. Anything else is refused. Images come from your media library or an https:// address.

Preview on tablet and phone

The builder shows a live preview and lets you switch between desktop, tablet and phone widths while you work, so you can see how a page looks before anyone else does.

Style a widget

Select a widget and scroll to Style in the panel. Every widget can be adjusted, and pages built before these options existed look exactly as they did.

OptionWhat it does
AlignmentLeft, center or right: the text of a hero, heading, text, quote or call to action; the title of features and FAQ; the position of a picture.
Background colourColours the band behind the widget, edge to edge. A hero or call to action drops its tinted card so your colour shows. If you pick a background but no text colour, the text turns light or dark on its own so it stays readable.
Text colourColours all the text in the widget, including the muted supporting lines.
Accent colourButton colour (hero and call to action), link colour (text), line colour (divider) and the plus sign (FAQ). Button text picks light or dark to stay readable.
Space above and belowNone, small, normal, large or extra large.
Content widthNarrow, normal, wide or full width.
  • Pick a colour with the colour picker, type a hex code such as #1a2b3c, or use one of the swatches. Reset puts the usual colour back.
  • A colour is always a plain hex code. Anything else (a name like "red", rgb(), or any other text) is refused, so a page can never carry style rules, even through the API or MCP.
  • The panel warns you when the text would be hard to read on its background.
  • The same style shows in the builder, on a share link and on your own website through the embed. AI agents can set it too: align, bgColor, textColor, accentColor, space and width on any widget.

Draft and published copies

Every page keeps a draft and a published copy. Saving changes the draft only; the live page does not change until you publish. If someone saved a newer version while you were editing, SharpWrite refuses to overwrite it and asks you to reload, so work is not lost silently.

Share a page with a private link

SharpWrite does not host a public website for you. To show a page to someone who has no website of their own, share it with a link, like "anyone with the link" in a document editor.

  • On the Pages screen, open Share on a published page and press Create link. Copy the address and send it.
  • The link stops working after 12 hours unless you choose another time: 1 hour, 12 hours, 1 day, 7 days or 30 days. There is no link that lasts forever.
  • Extend keeps the same address and counts the new time from now. New link gives a new address and the old one stops working at once. Turn off removes the link.
  • The link shows the published version of that one page, never a draft or an unpublished edit, and nothing else from your account. Unpublishing the page switches the link off.
  • Anyone who has the link can open it, so treat it like a password. Search engines never see these pages: they are blocked from indexing them.
  • Set one page as the homepage; the embed uses it when you do not name a page.

Why pages cannot carry scripts

Widgets are structured data, not raw HTML. Every value is plain text, a checked link or a checked image address, and it is escaped when the page is shown. A page cannot contain a script, whoever edits it.

Who can build pages

Owners, Admins and Editors can create, edit and publish pages. Viewers cannot change them. See Team and roles.