Configuration
Configuration
app.config.ts
Overrides live in the consumer's app/app.config.ts (it must be in the app/ directory — a root-level app.config.ts is silently ignored by layer merging):
// app/app.config.ts
export default defineAppConfig({
xBlog: {
title: 'Blog',
description: 'Latest articles and updates',
postsPerPage: 9,
dateFormat: 'MMM d, yyyy',
showAuthor: true,
showReadingTime: true,
showTags: true,
showTableOfContents: true,
showShareButtons: true,
pages: {
home: true,
list: true,
post: true,
},
},
})
Schema Reference
| Key | Type | Default | Description |
|---|---|---|---|
title | string | 'Blog' | Blog section title shown on the listing page. |
description | string | 'Latest articles and updates' | Blog section description shown on the listing page. |
postsPerPage | number | 9 | Number of posts per page for pagination. |
dateFormat | string | 'MMM d, yyyy' | Display date format. Note: currently reserved — the shipped useBlog().formatDate() renders a fixed localized short date (toLocaleDateString('en-US')) and does not read this key yet. |
showAuthor | boolean | true | Show author name on post cards and individual post pages. |
showReadingTime | boolean | true | Show estimated reading time on post cards and pages. |
showTags | boolean | true | Show tag badges on post cards and pages. |
showTableOfContents | boolean | true | Show XBLTableOfContents on individual post pages. |
showShareButtons | boolean | true | Show XBLShareButtons on individual post pages. |
pages.home | boolean | true | Enable the / → /blog 301 redirect. Set false to disable (route returns 404). |
pages.list | boolean | true | Enable the /blog listing page. Set false to disable (route returns 404). |
pages.post | boolean | true | Enable the /blog/[...slug] post detail page. Set false to disable (route returns 404). |
Runtime Config / Environment Variables
None required. All configuration is through app/app.config.ts.
AI Context
package: "@xenterprises/nuxt-x-blog"
config-key: xBlog
useBlog
Blog data access composable backed by queryCollection('blog') — fetch posts, tags, related posts, and paginated listings from Nuxt Content v3.
nuxt-x-affiliate
The everything-layer for niche affiliate review sites — 89 XAF* review-site components + 10 dashboard-family components, full-coverage schema.org JSON-LD composables (BlogPosting, Product + Review + AggregateRating, FAQ, Breadcrumb, Organization, Person, WebSite), FTC + opt-in legal disclosures, GTM click + impression tracking, site chrome + engagement loops + conversion widgets. Plug-and-play for 100 sites.
