Configuration
app.config.ts and runtimeConfig reference for @xenterprises/nuxt-x-restaurants.
Configuration
app.config.ts
export default defineAppConfig({
xRestaurants: {
name: 'My Restaurant Directory',
domain: 'mysite.com',
logo: '/logos/my-logo.webp',
navbar: {
links: [
{ label: 'Explore', to: '/restaurants' },
{ label: 'Articles', to: '/articles' },
],
},
homePage: {
hero: {
title: 'Find the Best Dining',
description: 'Explore top-rated restaurants...',
backgroundImage: 'https://...',
},
featured: {
title: 'Featured Places',
viewAllLink: '/restaurants',
},
},
menuCard: {
showImage: true,
showDescription: true,
showTags: true,
variant: 'default', // 'default' | 'compact' | 'horizontal'
imageAspect: 'video', // 'square' | 'video' | 'wide'
dietaryTags: [
{ id: 'vegetarian', label: 'Vegetarian', icon: 'i-heroicons-leaf', color: 'green' },
],
},
filters: {
title: 'Filters',
showClearAll: true,
},
},
})
Schema Reference
| Key | Type | Default | Description |
|---|---|---|---|
name | string | 'My Restaurant Directory' | Directory name used in metadata and headings. |
domain | string | 'mysite.com' | Public domain; used by useDomain() to build API base URLs. |
logo | string | '/logos/my-logo.webp' | Logo image path displayed in XRDNavbar. |
navbar.links | { label, to }[] | See example | Navigation links rendered by XRDNavbar. |
homePage.hero.title | string | 'Find the Best Dining' | Hero section headline. |
homePage.hero.description | string | 'Explore top-rated restaurants...' | Hero section subtext. |
homePage.hero.backgroundImage | string | '' | Hero background image URL. |
homePage.featured.title | string | 'Featured Places' | Featured restaurants section title. |
homePage.featured.viewAllLink | string | '/restaurants' | "View all" link in the featured section. |
menuCard.showImage | boolean | true | Show menu item image in XRDMenuCard. |
menuCard.showDescription | boolean | true | Show menu item description. |
menuCard.showTags | boolean | true | Show dietary/tag badges on menu items. |
menuCard.variant | 'default' | 'compact' | 'horizontal' | 'default' | Menu card layout variant. |
menuCard.imageAspect | 'square' | 'video' | 'wide' | 'video' | Menu card image aspect ratio. |
menuCard.dietaryTags | { id, label, icon, color }[] | See example | Dietary tag definitions used by useMenuCard(). |
filters.title | string | 'Filters' | Filters sidebar section title. |
filters.showClearAll | boolean | true | Show "Clear All" button in filters. |
Runtime Config / Environment Variables
| Variable | Required | Description |
|---|---|---|
NUXT_PUBLIC_API_ENDPOINT | Yes | Base URL for the restaurant API used by useDomain(). |
NUXT_PUBLIC_SITE_URL | No | Public site URL for meta tags. |
NUXT_PUBLIC_SITE_NAME | No | Site name for meta tags. |
AI Context
package: "@xenterprises/nuxt-x-restaurants"
config-key: xRestaurants
use-when: >
Customising the restaurant directory name, domain, logo, navbar links, homepage
copy, menu card layout/dietary tags, or filter panel behaviour. Set
NUXT_PUBLIC_API_ENDPOINT to connect useDomain() to your restaurant API.
