Skip to content
Docs

Sites and deploy

For old links and extension-free page addresses, see Redirects and plain addresses.

Publish a site

What this is
  1. Prepare index.html and use relative links for the other files. Keep servers and build tools out of the upload; upload their static output.

  2. Publish it.

    “Publish these files as my bakery site.” Confirm the name and address before the first publish.

    Select the event and team first. Use your team key and its exact site name. Organisers send JSON files to PUT /v1/hack/events/{slug}/website/files?create=1 with their account key. Build an event website from hack_get_page_recipe topic event so the public feed keeps its stage, dates, announcements, gallery and results live.

  3. Open the returned address and test the links and form saves.

    Publish before your team’s submission deadline. Read the event’s Website screen for the current deadline and the entry’s status. When returning from chat, check that the selected team is still yours before sending another update.

Update files

What this is
  1. Read the current file list before replacing files.

  2. Send the change.

    “On my bakery site, change the opening time to 8 am. Keep the other pages.”
  3. Open the live address and check the changed page.

Preview and publish a version

What this is
  1. Save the update with publish=false. Read GET /v1/sites/{sitename}/versions and note its version number.
  2. Create a preview with POST /v1/sites/{sitename}/versions/2/preview-link. Open the returned link; it stops working after an hour.
  3. Publish it with PUT /v1/sites/{sitename}/active-version and {"version_number":2}. To roll back, read the version list and send the earlier number instead.

Errors you may see

Code Means Do this
site_exists (409) Name already used Update that site or choose another name
not_found (404) Update files: no matching site Read the site list
site_not_found (404) Rename or roll back: no matching site Read the site list
item_too_large (413) Upload exceeds a cap Check Limits and errors

Next