Skip to main content
Liteshop hosts the static files a Nuxt build produces. This guide uses nuxt generate to prerender every page to HTML.

Before you begin

Create the app

The command installs the dependencies. Replace the welcome screen in app/app.vue with your pages:
Pages go in app/pages/, for example app/pages/index.vue and app/pages/about.vue.

Add the manifest

Nuxt copies everything in public/ to the root of the build, so put liteshop.json there:
Leave capabilities as {} if the Site has no Form. The Site Bundle reference lists every field.

Configure Nuxt and add the SDK

Install the Liteshop SDK:
Import liteshop from it wherever the Site uses Forms, bookings or the catalogue. It calls the Site’s own Liteshop endpoints and includes its TypeScript types. Update nuxt.config.ts:
  • liteshop() lets you try Forms with npm run dev. On the dev server, the plugin answers the SDK from liteshop.json: Form submissions are checked and printed in the terminal, the catalogue lists every item as available, and nothing is saved or sent to Liteshop.
  • autoSubfolderIndex: false writes /about as about.html instead of about/index.html. See Routing.

Submit a Form

Import the SDK and pass the Form ID as a literal string. Liteshop reads liteshop.forms.submit("contact", ...) from your built JavaScript to check that every declared Form has a handler.
@submit.prevent stops the browser’s own submit. Don’t add method="post" or an action to the form. See the Forms reference for field types and the anti-spam field.

Build and package the Site

The ZIP must have index.html and liteshop.json at its root, which zipping the contents of .output/public gives you. Don’t use npm run build: it builds a server, which Liteshop doesn’t run.

Upload the Site

To publish a new Site:
  1. In the Liteshop dashboard, click Website > Upload files.
  2. Enter the Site name and subdomain, and select site.zip.
  3. Click Check and publish.
To update a Site, open Website settings (the gear button on the Website page), and upload the new ZIP file in Upload an update. An update’s liteshop.json must name the live version in baseDeployment. If the value is missing or out of date, validation fails, and its repair message gives the exact value to set in public/liteshop.json. For details, see Publish and manage a Site.

Routing

Liteshop serves /about from about.html, and from about/index.html by redirecting to /about/. With autoSubfolderIndex: false, app/pages/about.vue is prerendered to about.html, so /about is served without a redirect. Link to /about without a trailing slash, for example <NuxtLink to="/about">. nuxt generate prerenders the pages it finds by following links from /, so a page the build doesn’t reach is missing on the live Site. Link to every page, and avoid dynamic routes such as app/pages/[slug].vue unless you list their paths in nitro.prerender.routes.

What runs on Liteshop

Liteshop hosts static output only: no server rendering, API routes or server routes. Nuxt’s server/ folder and useFetch calls to your own API don’t work. The Site’s security policy blocks scripts, styles and network requests to other origins, frames, workers and eval. Validation warns when your build appears to use one of those features, and fails on external scripts and frames. Nuxt itself uses fetch to load its prerendered page data from the Site, so every Nuxt build gets that warning; you can ignore it if your own code doesn’t call fetch for other origins.

Dashboard edits

Site Owners can edit catalogue items, collections, and stock in the dashboard, which publishes a new Deployment from your files without rebuilding your app. Read the catalogue in the browser with liteshop.catalogue.list(). Don’t import liteshop.json or render catalogue items at build time; otherwise, dashboard edits don’t appear on the Site until you rebuild and upload it again. See the Catalogue reference.