diff --git a/astro.config.mjs b/astro.config.mjs index fe7fbde..7862646 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -45,6 +45,11 @@ export default defineConfig({ label: 'How-to guides', items: [{ autogenerate: { directory: 'whp/how-to' } }], }, + { + label: 'Site Builder', + badge: { text: 'Beta', variant: 'tip' }, + items: [{ autogenerate: { directory: 'whp/site-builder' } }], + }, { label: 'Reference', items: [{ autogenerate: { directory: 'whp/reference' } }], diff --git a/src/assets/screenshots/whp/whp-site-builder-blocks.png b/src/assets/screenshots/whp/whp-site-builder-blocks.png new file mode 100644 index 0000000..26471db Binary files /dev/null and b/src/assets/screenshots/whp/whp-site-builder-blocks.png differ diff --git a/src/assets/screenshots/whp/whp-site-builder-code.png b/src/assets/screenshots/whp/whp-site-builder-code.png new file mode 100644 index 0000000..a40eae4 Binary files /dev/null and b/src/assets/screenshots/whp/whp-site-builder-code.png differ diff --git a/src/assets/screenshots/whp/whp-site-builder-editor.png b/src/assets/screenshots/whp/whp-site-builder-editor.png new file mode 100644 index 0000000..4eef803 Binary files /dev/null and b/src/assets/screenshots/whp/whp-site-builder-editor.png differ diff --git a/src/assets/screenshots/whp/whp-site-builder-landing.png b/src/assets/screenshots/whp/whp-site-builder-landing.png new file mode 100644 index 0000000..a12037d Binary files /dev/null and b/src/assets/screenshots/whp/whp-site-builder-landing.png differ diff --git a/src/assets/screenshots/whp/whp-site-builder-pages.png b/src/assets/screenshots/whp/whp-site-builder-pages.png new file mode 100644 index 0000000..ab595bd Binary files /dev/null and b/src/assets/screenshots/whp/whp-site-builder-pages.png differ diff --git a/src/assets/screenshots/whp/whp-site-builder-templates.png b/src/assets/screenshots/whp/whp-site-builder-templates.png new file mode 100644 index 0000000..2a5b03c Binary files /dev/null and b/src/assets/screenshots/whp/whp-site-builder-templates.png differ diff --git a/src/content/docs/whp/site-builder/blocks-and-pages.mdx b/src/content/docs/whp/site-builder/blocks-and-pages.mdx new file mode 100644 index 0000000..9efffc5 --- /dev/null +++ b/src/content/docs/whp/site-builder/blocks-and-pages.mdx @@ -0,0 +1,116 @@ +--- +title: Blocks & pages +description: The Site Builder block library, plus how to add pages and edit the shared header and footer. +sidebar: + order: 3 +--- + +import { Aside } from '@astrojs/starlight/components'; +import Beta from '~/content/partials/beta-callout.mdx'; +import Support from '~/content/partials/support-link.mdx'; + + + +## The block library + +The **Blocks** panel on the left of the editor groups every available content block into five collapsible categories. Drag any block onto the canvas to add it. + +![Blocks panel showing the Sections category open](~/assets/screenshots/whp/whp-site-builder-blocks.png) + +### Basic + +Building-block primitives for any page: + +- **Heading** — H1–H6, with the size set from the inline toolbar. +- **Text** — paragraph copy. Supports bold, italic, links, and lists. +- **Button** — call-to-action with label, link, and style. +- **Logo** — drop in your site logo from Assets. +- **Menu** — the site's main navigation (most commonly placed in the Header). +- **Footer** — quick footer wrapper (or use the dedicated Footer editor; see below). +- **Divider** — horizontal rule. +- **Spacer** — adjustable vertical whitespace. +- **Icon** — pick from a built-in icon set. +- **Star Rating** — five-star widget for reviews. +- **Social Links** — links to your social profiles with icons. +- **HTML** — drop in raw HTML when nothing else fits. + +### Layout + +Structural blocks that hold other blocks: + +- **Section** — a full-width strip of the page. +- **Container** — a centered, max-width wrapper. +- **1 / 2 / 3 / 4 / 5 / 6 Columns** — pre-set column rows. +- **Sidebar Left / Right** — content area with a sidebar. + +### Sections + +Pre-composed page sections — Hero, Features, CTA, Accordion, Tabs, Pricing, Gallery, Countdown, and more. Drop one in and edit the placeholder content. + +### Media + +Image, video, audio, and gallery blocks. Uploaded files live in the **Assets** panel and can be re-used across pages. + +### Forms + +Contact form, newsletter signup, and similar input blocks. + + + +## Editing blocks + +Click a block on the canvas to select it. From there: + +- **Inline toolbar** — quick text formatting (bold, italic, link, alignment). +- **Right panel** — block-specific settings (colour, padding, link, size, alt text, etc.). +- **Layers panel** (left) — see the block tree, drag to re-parent or re-order. + +To delete a block, select it and press **Delete** on your keyboard, or use the trash control in the inline toolbar. + +## Pages + +Most templates ship as multi-page sites. Manage pages from the **Pages** tab. + +![Pages panel with Edit Header / Edit Footer + page list](~/assets/screenshots/whp/whp-site-builder-pages.png) + +The **PAGES** list shows every page on the site, with its path (e.g. `Home /index`). The currently-edited page is highlighted. + +### Add a page + +1. In the Pages tab, click **+ Add Page**. +2. Give the page a name (used in navigation) and confirm the slug (used in the URL). +3. The new page opens, empty, ready for blocks. + +### Edit the shared header + +The **Edit Header** button at the top of the Pages tab opens the header in isolation. Whatever you put there appears on every page. The same applies to **Edit Footer**. + +This is the right place to drop your Menu, Logo, and Social Links blocks — once, instead of once per page. + +### Reorder or delete pages + +Click a page in the list to edit it. The menu beside the page name lets you rename, change the slug, duplicate, or delete. Deleting a page removes it from the site on the next publish. + + + +## Layers panel + +The **Layers** tab on the left shows the block tree for the current page — useful when blocks are nested inside containers and clicking on the canvas keeps selecting the wrong level. Click any layer to select that block; drag a layer to re-parent it. + +## Assets panel + +The **Assets** tab is where uploaded images, videos, and other media live. Drag an image directly from this panel into an image block, or use the **Upload** button to add new files. + +## Related + +- [Getting started](/whp/site-builder/getting-started/) +- [Styling your site](/whp/site-builder/styling/) +- [Publishing & code injection](/whp/site-builder/publishing/) + +## Still stuck? + + diff --git a/src/content/docs/whp/site-builder/getting-started.mdx b/src/content/docs/whp/site-builder/getting-started.mdx new file mode 100644 index 0000000..c403227 --- /dev/null +++ b/src/content/docs/whp/site-builder/getting-started.mdx @@ -0,0 +1,105 @@ +--- +title: Getting started +description: Open Site Builder, pick a template or start from scratch, make your first edits, and publish. +sidebar: + order: 2 +--- + +import { Steps, Aside } from '@astrojs/starlight/components'; +import Beta from '~/content/partials/beta-callout.mdx'; +import SignIn from '~/content/partials/signing-in.mdx'; +import Support from '~/content/partials/support-link.mdx'; + + + +## Before you start + +- A **site** added in WHP that you want Site Builder to manage. Any container type works — Site Builder writes its output to the site's docroot when you publish, so a **Static HTML** site is the cleanest fit. +- About 10–15 minutes for your first walkthrough. + +## Sign in to WHP + + + +## Open Site Builder + + + +1. In the sidebar, click **Site Builder**. You'll see a card for each site on your account. + ![Site Builder landing — list of your sites](~/assets/screenshots/whp/whp-site-builder-landing.png) + +2. Click **Build Site** on the site you want to edit. The visual editor opens. + + + +## Pick a template (or start blank) + +The editor opens onto an empty canvas, but the fastest way to get a real-looking site is to start from one of the 16 included templates. + + + +1. Click **Templates** in the top bar. + ![Templates picker](~/assets/screenshots/whp/whp-site-builder-templates.png) + +2. Browse the categories: **Business**, **Creative**, **Personal**, **Community**, or **All**. Each card shows the template name, a tag (Business / Creative / etc.), a short description, and the page count. + +3. Click a template to preview and apply. Most templates ship as multi-page sites with their own header, footer, and a few sample pages so you can see structure right away. + + + + + +If you'd rather start from scratch, skip Templates — the empty canvas with just a Header placeholder is the right starting point. + +## Make your first edit + +The editor has three panels: + +- **Left:** the **Blocks** panel (also **Pages**, **Layers**, **Assets**). +- **Centre:** the canvas — what your visitors will see. +- **Right:** the **Styles** panel. + + + +1. From the **Blocks** panel, drag a **Heading** block onto the canvas. + +2. Click the heading on the canvas. An inline toolbar appears; type to replace the text. + +3. Drag a **Text** block underneath and add a sentence or two. + +4. Drag a **Button** block next. Click it, set its label and link in the right-side panel. + + + +You've built your first page. The header at the top is the **shared header** — every page on the site uses it. + +## Preview the result + +The top bar has three device toggles next to the site name: **desktop**, **tablet**, **mobile**. Click each to see how your page looks at that width. The **Preview** button opens a full-window preview without the editor chrome. + +## Save vs. publish + +Two distinct actions: + +- **Save** stores a draft. Your changes are kept on the server but the live site is unchanged. +- **Publish** writes the rendered HTML and assets to the site's docroot. Your visitors see the new version on the next request. + + + +## Get back to the Site Builder list + +Click **Back to Panel** in the top-left of the editor. You can come back any time and continue from where you left off. + +## What's next + +- **[Blocks & pages](/whp/site-builder/blocks-and-pages/)** — the rest of the block library, and how to add more pages. +- **[Styling your site](/whp/site-builder/styling/)** — set your colours and fonts in one place. +- **[Publishing & code injection](/whp/site-builder/publishing/)** — add analytics, custom fonts, or global CSS. + +## Still stuck? + + diff --git a/src/content/docs/whp/site-builder/overview.mdx b/src/content/docs/whp/site-builder/overview.mdx new file mode 100644 index 0000000..95878d4 --- /dev/null +++ b/src/content/docs/whp/site-builder/overview.mdx @@ -0,0 +1,52 @@ +--- +title: Site Builder overview +description: Build a website visually inside WHP — drag-and-drop blocks, ready-made templates, draft / publish workflow. +sidebar: + order: 1 + badge: + text: Beta + variant: tip +--- + +import Beta from '~/content/partials/beta-callout.mdx'; +import Support from '~/content/partials/support-link.mdx'; + + + +**Site Builder** is a visual editor that lives inside WHP. You don't need to know HTML or CSS to use it — drag content blocks onto a page, tweak text and colours in place, and click **Publish** when you're ready. It builds a real static website that's hosted on the WHP site you point it at, so the published output is fast and works exactly like any other site you'd host with us. + +![Site Builder landing page](~/assets/screenshots/whp/whp-site-builder-landing.png) + +## What you get + +- **50+ drag-and-drop content blocks** across Basic, Layout, Sections, Media, and Forms categories. +- **16 ready-made templates** — restaurant, small business, SaaS landing, agency, medical/dental, portfolio, photography, content creator, event/conference, and more. +- **Multi-page sites** with a shared header and footer that update everywhere at once. +- **Image and video uploads** managed in the **Assets** panel. +- **Mobile-responsive preview** — desktop, tablet, and mobile views from one toggle. +- **Site Design Tokens** — set your primary, secondary, and accent colours plus heading and body fonts once, and they apply across every block on the site. +- **Custom head code injection** for analytics, custom fonts, or global CSS. +- **Save drafts & publish when ready** — your edits don't go live until you click Publish. + +## When Site Builder is the right tool + +- You want a landing page, marketing site, or small multi-page brochure. +- You don't want to touch HTML/CSS, but you want more flexibility than a one-size template. +- You want to ship a draft to a colleague for review before it goes live. + +## When it isn't + +- You're running a CMS (WordPress, Drupal, etc.) — those run as regular WHP sites of their own, not inside Site Builder. +- You need server-side dynamic behaviour beyond simple forms — Site Builder produces static pages. +- You already have a build pipeline (Astro, Hugo, Next.js static export) — keep using that; just deploy the output to a regular WHP site. + +## In this section + +- **[Getting started](/whp/site-builder/getting-started/)** — open the editor, pick a template or start blank, make your first edit, save and publish. +- **[Blocks & pages](/whp/site-builder/blocks-and-pages/)** — the block library, adding pages, editing the shared header and footer. +- **[Styling your site](/whp/site-builder/styling/)** — Site Design Tokens, fonts, advanced styling controls. +- **[Publishing & code injection](/whp/site-builder/publishing/)** — drafts vs. publish, the device previews, adding custom `` code. + +## Still stuck? + + diff --git a/src/content/docs/whp/site-builder/publishing.mdx b/src/content/docs/whp/site-builder/publishing.mdx new file mode 100644 index 0000000..ed78e01 --- /dev/null +++ b/src/content/docs/whp/site-builder/publishing.mdx @@ -0,0 +1,79 @@ +--- +title: Publishing & code injection +description: Drafts vs. publish, device previews, and adding analytics, custom fonts, or global CSS via the custom head code panel. +sidebar: + order: 5 +--- + +import { Aside } from '@astrojs/starlight/components'; +import Beta from '~/content/partials/beta-callout.mdx'; +import Support from '~/content/partials/support-link.mdx'; + + + +## Drafts vs. publish + +Site Builder separates "save my edits" from "make these edits live." + +- **Save** stores your edits as a draft on the server. You can close the editor and come back; your work is preserved. The live site doesn't change. +- **Publish** renders the site, writes the resulting HTML and assets to the site's docroot, and serves it to visitors on the next request. + +The two buttons are in the top right of the editor. + + + +## Preview before publishing + +Two previews are available, both without affecting the live site: + +- **Inline preview** — the desktop/tablet/mobile toggle on the top bar swaps the canvas viewport so you can see how the page reflows. +- **Full-window preview** — click **Preview** at the top to see your draft rendered without the editor chrome. Use this to read the page like a visitor. + +If you want to share a preview with someone outside your account, save the draft, then publish to a staging site (a separate WHP site you keep around for review). + +## Custom head code + +The **Code** button at the top of the editor opens a modal where you can paste content into the `` of every page on the site. + +![Custom head code editor](~/assets/screenshots/whp/whp-site-builder-code.png) + +Common uses: + +- **Google Analytics, Plausible, Fathom, or other analytics** — paste the tracking snippet they give you. +- **Custom fonts** — `` tags pointing at Google Fonts, Fontsource, or your own hosted font. +- **Global CSS overrides** — inline `