Storefront Configuration
Feature Flags
Feature flags are set via environment variables and control optional storefront behaviour.
| Variable | Type | Default | Description |
|---|---|---|---|
NUXT_PUBLIC_SHOP_BITE_FEATURE_MULTI_CHANNEL | boolean | false | Enables the sales channel switcher in the header. Use this when you operate multiple locations under one storefront. |
NUXT_PUBLIC_SHOP_BITE_FEATURE_SECURE_KEY | string | (empty) | When set, the entire storefront is locked behind this key. Visitors must provide ?secureKey=<value> in the URL once; the key is then persisted in a cookie for 30 days. Without a valid cookie, all pages redirect to /maintenance. Leave empty to disable. |
NUXT_PUBLIC_SHOP_BITE_FEATURE_CONTACT_FORM | boolean | false | Enables the /kontakt contact page. When false, the page returns a 404. |
NUXT_PUBLIC_SHOP_BITE_FEATURE_DEMO_BANNER | boolean | false | Shows a non-dismissible notice above the header that the shop is a demo and orders are not fulfilled. Enable it for the demo shops in demos/. |
NUXT_PUBLIC_SHOP_BITE_MENU_CATEGORY_ID | string | "main-navigation" | The Shopware category ID used as the root of the navigation menu. |
NUXT_PUBLIC_SHOP_BITE_ADDRESS_AUTOCOMPLETE_BOUNDING_BOX | string | (empty) | Rectangle lon1,lat1,lon2,lat2 that narrows the address suggestions (Geoapify) in the checkout, e.g. 8.822251,50.055026,8.899077,50.104327. Convenience only: where the shop delivers is decided by the cart rules in Shopware. Leave empty for unrestricted suggestions. |
.env example:
NUXT_PUBLIC_SHOP_BITE_FEATURE_MULTI_CHANNEL=false
NUXT_PUBLIC_SHOP_BITE_FEATURE_SECURE_KEY=
NUXT_PUBLIC_SHOP_BITE_FEATURE_CONTACT_FORM=false
NUXT_PUBLIC_SHOP_BITE_FEATURE_DEMO_BANNER=false
NUXT_PUBLIC_SHOP_BITE_MENU_CATEGORY_ID=main-navigation
NUXT_PUBLIC_SHOP_BITE_ADDRESS_AUTOCOMPLETE_BOUNDING_BOX="8.822251,50.055026,8.899077,50.104327"
SEO
The storefront outputs a sitemap, canonical URLs, share previews and page titles automatically. Environment variables control the values.
| Variable | Default | Description |
|---|---|---|
NUXT_PUBLIC_STORE_URL | (empty) | Public URL of the shop, e.g. https://www.my-shop.com. Base for canonical URLs, og:url, og:image, the sitemap and the sitemap entry in robots.txt. Without it the request URL is used, which can be wrong behind a reverse proxy. |
NUXT_PUBLIC_SITE_NAME | NUXT_STORE_NAME at build time | Shop name in page titles and og:site_name. |
NUXT_PUBLIC_SITE_TITLE_TEMPLATE | see below | Page title template. %s is the page title, %siteName the shop name. Leave empty to output the page title only. |
NUXT_PUBLIC_SITE_OG_IMAGE | /card.png | Share preview image (WhatsApp, Facebook) for pages without their own image. Path relative to public/ or an absolute URL; the output is always an absolute URL. |
NUXT_PUBLIC_SITE_ADDRESS_CITY | (empty) | City, e.g. Obertshausen. Used in the home page title and description and in the footer. |
NUXT_PUBLIC_SITE_CUISINE | (empty) | Cuisine, e.g. Italienisch-deutsche Küche. Used in the home page description. |
.env example:
NUXT_PUBLIC_STORE_URL="https://www.my-shop.com"
NUXT_PUBLIC_SITE_NAME="Pizzeria Example"
NUXT_PUBLIC_SITE_TITLE_TEMPLATE="%s | %siteName – Online bestellen"
NUXT_PUBLIC_SITE_OG_IMAGE="/card.png"
NUXT_PUBLIC_SITE_ADDRESS_CITY="Obertshausen"
NUXT_PUBLIC_SITE_CUISINE="Italienisch-deutsche Küche"
Page titles and descriptions
- Subpages and categories get the title template, e.g.
Pizza | Pizzeria Example – Online bestellen. Categories use the meta title and meta description from Shopware, otherwise the category name and description. - The home page does not use the template. Its default title is
<shop name> <city> | Online bestellen & liefern lassen; the description is built from cuisine, city and shop name. - Set custom home page values in
content/index.ymlunderseo. They take precedence over the defaults, but only if they differ from the page'stitleanddescription: Nuxt Content otherwise fillsseowith those values automatically.
seo:
title: Pizzeria Example Obertshausen | Pizza online bestellen
description: Pizza, Pasta und Salate in Obertshausen online bestellen, liefern lassen oder abholen.
image: /card.png
Share preview (og:image)
Category pages use the category image from Shopware, the home page uses seo.image from content/index.yml. All other pages fall back to NUXT_PUBLIC_SITE_OG_IMAGE. twitter:card is summary_large_image.
The default /card.png shows the ShopBite demo. Put your own public/card.png into the shop project (1200 × 630 px recommended) to replace it. Check the preview with the Facebook Sharing Debugger. WhatsApp caches previews for a while.
Sitemap
/sitemap.xml contains:
- the home page
- content pages from
content/(e.g. payment and shipping) - all categories of the main navigation and the menu category tree (
NUXT_PUBLIC_SHOP_BITE_MENU_CATEGORY_ID) with their SEO URL, modification date and category image /kontaktif the contact form is enabled
robots.txt references the sitemap automatically. Paths blocked via robots.disallow are left out of the sitemap. Exclude a single content page with sitemap: false in its frontmatter. The sitemap is cached for ten minutes.
Category URLs come from the SEO URL templates in Shopware. A trailing slash (e.g. /c/Pizza/) is kept in both the sitemap and the canonical URL.
Contact details and opening hours in the footer
The footer shows the address, phone number, a link to the Google Business Profile and the opening hours on every page as text in the HTML. Search engines read name, address and phone (NAP) straight from the shop, which strengthens local ranking. Keep the values identical to the Google Business Profile and the imprint.
| Variable | Default | Description |
|---|---|---|
NUXT_PUBLIC_SITE_ADDRESS_STREET | (empty) | Street and number, e.g. Kantstr. 6. |
NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE | (empty) | Postal code, e.g. 63179. |
NUXT_PUBLIC_SITE_ADDRESS_CITY | (empty) | City, see SEO. |
NUXT_PUBLIC_SITE_TELEPHONE | (empty) | Phone number as it should be displayed, e.g. +49 6104 71427. The tel: link is generated from it; it also sits behind the phone icon in the header and the "Jetzt anrufen" button on the order page. Without a number these elements are hidden. |
NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL | (empty) | Link to the Google Business Profile, e.g. from Google Maps via "Share". |
The shop name comes from NUXT_PUBLIC_SITE_NAME. Empty values are hidden. Without contact details and opening hours the footer stays as before.
Opening hours come from the business hours of the ShopBite plugin in Shopware. Consecutive days with the same hours are grouped (e.g. Mi–Fr); days without hours show as "Ruhetag".
.env example:
NUXT_PUBLIC_SITE_ADDRESS_STREET="Kantstr. 6"
NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE="63179"
NUXT_PUBLIC_SITE_ADDRESS_CITY="Obertshausen"
NUXT_PUBLIC_SITE_TELEPHONE="+49 6104 71427"
NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL="https://maps.app.goo.gl/..."
Do not also maintain address and phone as link categories in the Shopware footer navigation, or they show up twice.
Brand colour and contrast
The brand colour is set in app/assets/css/main.css as a colour scale --color-brand-50 to --color-brand-950, either mapped to a Tailwind scale or as custom hex values. The storefront derives the primary colour from it: brand-600 in light mode, brand-400 in dark mode (the Nuxt UI convention).
@import "@shopbite-de/storefront/app/assets/css/main.css";
@theme {
--color-brand-50: var(--color-rose-50);
/* ... */
--color-brand-400: var(--color-rose-400);
--color-brand-500: var(--color-rose-500);
--color-brand-600: var(--color-rose-600);
/* ... */
--color-brand-950: var(--color-rose-950);
}
Text in the primary colour (headlines, links, product numbers) and text on primary buttons need a contrast ratio of at least 4.5:1 (WCAG AA), otherwise Lighthouse reports a contrast failure under "Accessibility". Subtle buttons and badges (variant: subtle) put the colour on a light tint of itself, so the light step should reach 5:1 on white. Check two values, e.g. with the Contrast Checker:
| Step | Background | Minimum contrast |
|---|---|---|
brand-600 | White #ffffff | 5:1 |
brand-400 | Dark #171717 | 4.5:1 |
If the customer's colour misses that, pick darker or lighter values for the 600 and 400 steps; the 500 step stays free for accents without text.
Nuxt Config
Some examples how to configure the storefront. Checkout the Nuxt Config for more information.
export default defineNuxtConfig({
app: {
head: {
title: "My Store",
htmlAttrs: {
lang: "en",
},
meta: [
{charset: "utf-8"},
{name: "viewport", content: "width=device-width, initial-scale=1"},
{name: "description", content: "My Store description"},
{property: "og:title", content: "My Store"},
{property: "og:description", content: "My Store description",},
],
link: [{rel: "icon", href: "/favicon.ico"}],
},
},
runtimeConfig: {
public: {
site: {
name: "My Store",
description: "My Store description",
countryId: "",
titleTemplate: "%s | %siteName – Online bestellen",
ogImage: "/card.png",
cuisine: "Italian cuisine",
address: {
street: "Kantstr. 6",
postalCode: "63179",
city: "Obertshausen",
},
telephone: "+49 6104 71427",
googleBusinessProfileUrl: "https://maps.app.goo.gl/...",
},
},
},
colorMode: {
preference: "light",
},
pwa: {
manifest: {
name: "My Store",
short_name: "mystore",
theme_color: "#4d7c0f",
icons: [
{
src: "log192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "any maskable",
}
],
},
},
})
Structured data (schema.org)
The storefront emits JSON-LD so Google understands the shop as a restaurant with opening hours and a menu:
- Home page:
Restaurant(aLocalBusiness) with name, address, phone, cuisine, price range, image, link to the Google Business Profile, the weekly opening hours (openingHoursSpecification) and closing days (specialOpeningHoursSpecification) from the ShopBite plugin, plushasMenuwith oneMenuSectionper menu category. - Category pages:
MenuSectionwith the category's products asMenuItemincluding the price (offers), next to the existingCollectionPageandBreadcrumbList.
The values come from the same variables as the footer (NUXT_PUBLIC_SITE_NAME, NUXT_PUBLIC_SITE_ADDRESS_*, NUXT_PUBLIC_SITE_TELEPHONE, NUXT_PUBLIC_SITE_CUISINE, NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL, NUXT_PUBLIC_SITE_OG_IMAGE). Two variables exist for the schema only:
| Variable | Default | Description |
|---|---|---|
NUXT_PUBLIC_SITE_ADDRESS_COUNTRY | DE | Country of the address as ISO code. |
NUXT_PUBLIC_SITE_PRICE_RANGE | (empty) | Price range, e.g. €€. |
Empty values are left out. Check the result with the Rich Results Test or the Schema Markup Validator: both should detect a Restaurant with opening hours on the home page.