Web UI
static webui starts a small web app on your own machine for managing a site without touching files. It works on the same Markdown and JSON files the command line uses, so anything you do in it also shows up in your editor and in git.
static webui # inside a project folder
static webui my-site # or by project name
It opens http://localhost:4321. Use --port=<n> for another port and --no-open to skip opening the browser. Press Ctrl+C to stop it.
What you can do
- Write notes. The timeline for a note collection has a compose box at the top: text, photos with alt text, and tags. Hashtags in the text count as tags. Press Cmd or Ctrl and Enter to post.
- Edit and delete notes. Hover a note and use the pencil or bin. Editing happens in place. Deleting a note also deletes its photos.
- Write blog posts. Collections with titles (such as
posts) get a full editor: title, description, Markdown content, tags and a draft toggle. Photos you add are uploaded and inserted into the text as Markdown images. - Change site settings. The Settings tab edits
data/site.jsonas a form: name, description, production URL, locale, timezone, URL style, default theme, icon and share image, profile, navigation, social links, collection options and the deploy target. A JSON view shows the whole file. Keys the form does not know about, and${VAR}references, are kept. - Deploy. The Deploy button publishes the site to the host in your
deploysettings (production or a draft preview) and shows the log if it fails. A counter shows how many changes you have made since the last deploy.
Saving writes straight to content/ and data/site.json; nothing goes live until you deploy. Run static dev alongside it to see changes as you make them.
Collections
The sidebar lists every collection found in content/ or data/site.json. A collection named notes, or with "style": "note", uses the timeline. Any other collection uses the post editor. If a project has no blog folder there is no blog entry: create content/posts/ (or run static post "Title" once) and it appears.
Your profile
Notes show the name and avatar from the profile object in data/site.json, followed by the project name. The avatar is a file in images/.
"profile": { "name": "Your Name", "avatar": "avatar.jpg", "bio": "Short bio" }
Security
The server only listens on 127.0.0.1, rejects requests that are not addressed to localhost, and requires a random per-run token on every API call, so other websites and other machines cannot use it. It is meant for your own computer, not for exposing to a network.
Posting from a phone
The web UI needs your computer. To post from anywhere without a server or a login, run static remote and deploy the page it creates. See Microblogging.
See also
- Commands for every flag.
- Microblogging and Blog & collections for how the content is published.
- Deploying & CI for setting up the
deploytarget.