Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nuxt/content
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.3.0
Choose a base ref
...
head repository: nuxt/content
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.4.0
Choose a head ref

Commits on Mar 7, 2025

  1. chore(deps): update devdependency shiki-transformer-color-highlight t…

    …o v1 (#3224)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3dbdb3d View commit details
  2. feat(collection): add support for Bitbucket repository (#3226)

    ---------
    
    Co-authored-by: Olaf Maltha <olafoliver.maltha@gmail.com>
    Co-authored-by: Farnabaz <farnabaz@gmail.com>
    3 people authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    55b0e5b View commit details
  3. chore: upgrade deps

    farnabaz committed Mar 7, 2025
    Copy the full SHA
    6f77eae View commit details

Commits on Mar 10, 2025

  1. fix: check for ws existence before closing (#3238)

    danielroe authored Mar 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6ec0eb8 View commit details
  2. fix(parser): recreate highlighter when options did change

    farnabaz committed Mar 10, 2025
    Copy the full SHA
    53875b1 View commit details
  3. chore: remove unused type

    farnabaz committed Mar 10, 2025
    Copy the full SHA
    2116916 View commit details
  4. chore: upgrade deps (#3241)

    farnabaz authored Mar 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    75121d5 View commit details

Commits on Mar 17, 2025

  1. fix(module): prevent conflict with auth & security tools (#3245)

    farnabaz authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    dc27bc9 View commit details
  2. docs: update source options (#3253)

    ---------
    
    Co-authored-by: Farnabaz <farnabaz@gmail.com>
    cossssmin and farnabaz authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    80967f4 View commit details
  3. chore: upgrade deps

    farnabaz committed Mar 17, 2025
    Copy the full SHA
    52d3f20 View commit details

Commits on Mar 18, 2025

  1. chore(deps): update @nuxt/ui-pro (#3255)

    ---------
    
    Co-authored-by: Farnabaz <farnabaz@gmail.com>
    benjamincanac and farnabaz authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e3e360f View commit details
  2. chore: upgrade deps (#3256)

    farnabaz authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7549f53 View commit details
  3. feat(db): experimental node:sqlite under flag (#3230)

    farnabaz authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e97d579 View commit details
  4. docs(templates): set docs branch to main

    larbish authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e7a500f View commit details
  5. feat(search): retrieve extra fields in search sections (#3178)

    farnabaz authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    29f4b3e View commit details

Commits on Mar 19, 2025

  1. docs(schema): reusable schema generation

    larbish committed Mar 19, 2025
    Copy the full SHA
    98276ff View commit details
  2. types: fix strict null checks (#3265)

    ---------
    
    Co-authored-by: Farnabaz <farnabaz@gmail.com>
    MellKam and farnabaz authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8c2afa5 View commit details
  3. dcos: add environment requirement in server deployment (#3262)

    ---------
    
    Co-authored-by: Farnabaz <farnabaz@gmail.com>
    DevDengChao and farnabaz authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1011cc4 View commit details
  4. chore(deps): update all non-major dependencies (#3207)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e0e852d View commit details
  5. docs: remove unused packages

    farnabaz committed Mar 19, 2025
    Copy the full SHA
    be99f3a View commit details
  6. chore: upgrade MDC module (#3266)

    farnabaz authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fe4506a View commit details
  7. chore(deps): update pnpm to v10.6.5 (#3267)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0164787 View commit details
  8. chore(deps): update nuxt framework to ^3.16.1 (#3268)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    59d1e82 View commit details

Commits on Mar 20, 2025

  1. chore: update the playground styling to be easier to navigate (#3270)

    JosephAnson authored Mar 20, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8c22216 View commit details
  2. chore: upgrade deps

    farnabaz committed Mar 20, 2025
    Copy the full SHA
    24d09b2 View commit details
  3. chore: upgrade deps

    farnabaz committed Mar 20, 2025
    Copy the full SHA
    99bb380 View commit details
  4. chore(release): v3.4.0

    farnabaz committed Mar 20, 2025
    Copy the full SHA
    ba721a8 View commit details
Showing with 3,723 additions and 4,250 deletions.
  1. +14 −0 CHANGELOG.md
  2. +2 −2 docs/app/app.config.ts
  3. +3 −3 docs/app/assets/css/main.css
  4. +4 −4 docs/app/components/AppFooter.vue
  5. +2 −2 docs/app/components/AppHeader.vue
  6. +1 −1 docs/app/components/PreviewCard.vue
  7. +1 −1 docs/app/components/post/PostPage.vue
  8. +2 −2 docs/app/pages/changelog/index.vue
  9. +2 −0 docs/app/pages/docs/[...slug].vue
  10. +12 −12 docs/app/pages/studio/pricing.vue
  11. +1 −1 docs/app/pages/templates/index.vue
  12. +28 −28 docs/content.config.ts
  13. +4 −3 docs/content/blog/ui-pro-docs-migration.md
  14. +38 −2 docs/content/docs/2.collections/3.sources.md
  15. +9 −0 docs/content/docs/6.deploy/1.server.md
  16. +6 −6 docs/content/index.md
  17. +16 −16 docs/content/studio/index.md
  18. +1 −1 docs/content/templates/docs.md
  19. +9 −1 docs/nuxt.config.ts
  20. +11 −15 docs/package.json
  21. +2 −4 examples/basic/package.json
  22. +2 −2 examples/blog/package.json
  23. +1 −1 examples/i18n/app/app.vue
  24. +4 −6 examples/i18n/package.json
  25. +1 −1 examples/ui-pro/app/app.vue
  26. +3 −5 examples/ui-pro/package.json
  27. +32 −36 package.json
  28. +71 −4 playground/app.vue
  29. +111 −0 playground/components/ContentPage.vue
  30. +0 −29 playground/layouts/content-v2.vue
  31. +2 −23 playground/layouts/default.vue
  32. +0 −5 playground/layouts/empty.vue
  33. +0 −26 playground/layouts/nuxt.vue
  34. +0 −29 playground/layouts/vue.vue
  35. +3 −0 playground/nuxt.config.ts
  36. +5 −5 playground/package.json
  37. +6 −19 playground/pages/[...slug].vue
  38. +22 −15 playground/pages/content-v2/[...slug].vue
  39. +14 −3 playground/pages/data/[...slug].vue
  40. +20 −23 playground/pages/hackernews/[...slug].vue
  41. +8 −18 playground/pages/nuxt/[...slug].vue
  42. +8 −18 playground/pages/vue/[...slug].vue
  43. +2,727 −3,679 pnpm-lock.yaml
  44. +13 −4 pnpm-workspace.yaml
  45. +2 −0 src/features/llms/module.ts
  46. +12 −7 src/module.ts
  47. +1 −1 src/presets/cloudflare-pages.ts
  48. +1 −1 src/presets/node.ts
  49. +4 −2 src/presets/nuxthub.ts
  50. +1 −1 src/runtime/app.ts
  51. +2 −2 src/runtime/internal/api.ts
  52. +1 −1 src/runtime/internal/connectors/bunsqlite.ts
  53. +2 −2 src/runtime/internal/database.client.ts
  54. +3 −3 src/runtime/internal/database.server.ts
  55. +5 −19 src/runtime/internal/navigation.ts
  56. +7 −7 src/runtime/internal/preview/collection.ts
  57. +7 −4 src/runtime/internal/preview/compatibility.ts
  58. +5 −5 src/runtime/internal/preview/index.ts
  59. +1 −1 src/runtime/internal/query.ts
  60. +9 −5 src/runtime/internal/search.ts
  61. +11 −0 src/runtime/internal/utils.ts
  62. +6 −5 src/types/collection.ts
  63. +11 −1 src/types/module.ts
  64. +1 −1 src/types/query.ts
  65. +11 −2 src/utils/collection.ts
  66. +76 −69 src/utils/content/index.ts
  67. +72 −29 src/utils/database.ts
  68. +4 −4 src/utils/dev.ts
  69. +30 −9 src/utils/git.ts
  70. +1 −0 src/utils/preview/module.ts
  71. +36 −1 src/utils/source.ts
  72. +4 −4 src/utils/templates.ts
  73. +3 −2 test/basic.test.ts
  74. +1 −1 test/bun.test.ts
  75. +2 −2 test/empty.test.ts
  76. 0 test/fixtures/basic/{ → app}/app.vue
  77. +5 −0 test/fixtures/basic/nuxt.config.ts
  78. +7 −0 test/fixtures/basic/package.json
  79. +2 −0 test/fixtures/empty/nuxt.config.ts
  80. +3 −3 test/unit/generateCollectionInsert.test.ts
  81. +153 −0 test/unit/git/url.test.ts
  82. +0 −1 tsconfig.json
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [3.4.0](https://github.com/nuxt/content/compare/v3.3.0...v3.4.0) (2025-03-20)

### Features

* **collection:** add support for Bitbucket repository ([#3226](https://github.com/nuxt/content/issues/3226)) ([55b0e5b](https://github.com/nuxt/content/commit/55b0e5b7dd5893e74c3707d42049f8a112e82163))
* **db:** experimental `node:sqlite` under flag ([#3230](https://github.com/nuxt/content/issues/3230)) ([e97d579](https://github.com/nuxt/content/commit/e97d579f100a8d7d26421876a1174eaa35bfb438))
* **search:** retrieve extra fields in search sections ([#3178](https://github.com/nuxt/content/issues/3178)) ([29f4b3e](https://github.com/nuxt/content/commit/29f4b3e57867be2670eb4c79aa0130f5f4e10256))

### Bug Fixes

* check for ws existence before closing ([#3238](https://github.com/nuxt/content/issues/3238)) ([6ec0eb8](https://github.com/nuxt/content/commit/6ec0eb8bc5db94760db6672e83635dcc91dfbf22))
* **module:** prevent conflict with auth & security tools ([#3245](https://github.com/nuxt/content/issues/3245)) ([dc27bc9](https://github.com/nuxt/content/commit/dc27bc94c1a4ab09adb8169a08d08ffbb85f9ddf))
* **parser:** recreate highlighter when options did change ([53875b1](https://github.com/nuxt/content/commit/53875b1eac74f4f07e381a361241446229d88d62))

## [3.3.0](https://github.com/nuxt/content/compare/v3.2.2...v3.3.0) (2025-03-05)

### Features
4 changes: 2 additions & 2 deletions docs/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -10,14 +10,14 @@ export default defineAppConfig({
pageHero: {
slots: {
title: 'font-semibold sm:text-6xl',
description: 'sm:text-lg text-[var(--ui-text-toned)] max-w-5xl mx-auto',
description: 'sm:text-lg text-(--ui-text-toned) max-w-5xl mx-auto',
container: 'py-16 sm:py-20 lg:py-24',
},
},
pageSection: {
slots: {
title: 'font-semibold lg:text-4xl',
featureLeadingIcon: 'text-[var(--ui-text-highlighted)]',
featureLeadingIcon: 'text-(--ui-text-highlighted)',
},
},
},
6 changes: 3 additions & 3 deletions docs/app/assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import "tailwindcss";
@import "tailwindcss" theme(static);
@import "@nuxt/ui-pro";

@source "../../../content";
@source "../../../content/**/*.md";

@theme {
@theme static {
--font-sans: 'Public Sans', sans-serif;

--color-green-50: #EFFDF5;
8 changes: 4 additions & 4 deletions docs/app/components/AppFooter.vue
Original file line number Diff line number Diff line change
@@ -30,17 +30,17 @@ const route = useRoute()
v-if="route.path.startsWith('/pro')"
to="https://content.nuxt.com/pro/purchase"
target="_blank"
class="text-sm text-[--ui-text-muted]"
class="text-sm text-(--ui-text-muted)"
>
Purchase <span class="text-[--ui-text-highlighted]">Nuxt Content Pro</span>
Purchase <span class="text-(--ui-text-highlighted)">Nuxt Content Pro</span>
</NuxtLink>
<NuxtLink
v-else
to="https://github.com/nuxt/content"
target="_blank"
class="text-sm text-[--ui-text-muted]"
class="text-sm text-(--ui-text-muted)"
>
Published under <span class="text-[--ui-text-highlighted]">MIT License</span>
Published under <span class="text-(--ui-text-highlighted)">MIT License</span>
</NuxtLink>
</template>

4 changes: 2 additions & 2 deletions docs/app/components/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ const linksWithoutIcon = computed(() => links.value.map(({ icon, ...link }) => l
<template #left>
<NuxtLink
to="/"
class="flex items-end gap-2 font-bold text-xl text-[--ui-text-highlighted] min-w-0"
class="flex items-end gap-2 font-bold text-xl text-(--ui-text-highlighted) min-w-0"
aria-label="Nuxt Content"
>
<AppLogo class="w-auto h-6 shrink-0" />
@@ -35,7 +35,7 @@ const linksWithoutIcon = computed(() => links.value.map(({ icon, ...link }) => l
trailing-icon="i-lucide-chevron-down"
size="xs"
class="-mb-[3px] font-semibold rounded-full truncate hidden sm:flex"
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
:class="[open && 'bg-(--ui-primary)/15 ']"
:ui="{
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' '),
}"
2 changes: 1 addition & 1 deletion docs/app/components/PreviewCard.vue
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ defineProps({

<template>
<div
class="px-4 py-1 border rounded-b-md border-[var(--ui-color-neutral-200)] dark:border-[var(--ui-color-neutral-700)] bg-[var(--ui-color-neutral-50)] dark:bg-[var(--ui-color-neutral-800)] dark:text-white"
class="px-4 py-1 border rounded-b-md border-(--ui-border-muted) bg-(--ui-bg-muted) dark:text-white"
>
<slot />
</div>
2 changes: 1 addition & 1 deletion docs/app/components/post/PostPage.vue
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ function copyLink() {
variant="outline"
color="neutral"
/>
<time class="text-[var(--ui-text)]">{{ formatDateByLocale(post.date) }}</time>
<time class="text-(--ui-text)">{{ formatDateByLocale(post.date) }}</time>
</div>
</div>
</template>
4 changes: 2 additions & 2 deletions docs/app/pages/changelog/index.vue
Original file line number Diff line number Diff line change
@@ -96,11 +96,11 @@ watch(() => arrivedState.bottom, () => {
<div class="relative hidden lg:flex lg:min-w-[150px]">
<div
ref="dots"
class="hidden w-2 h-2 rounded-full lg:block bg-[var(--ui-primary)]"
class="hidden w-2 h-2 rounded-full lg:block bg-(--ui-primary)"
:class="{ neon: index === 0 }"
/>

<div class="absolute left-[3.5px] top-0.5 h-full w-[1px] bg-[var(--ui-primary)]" />
<div class="absolute left-[3.5px] top-0.5 h-full w-[1px] bg-(--ui-primary)" />
</div>
<div class="pb-32">
<UBlogPost
2 changes: 2 additions & 0 deletions docs/app/pages/docs/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { ContentNavigationItem } from '@nuxt/content'
import { kebabCase } from 'scule'
import { findPageHeadline } from '#ui-pro/utils/content'
const route = useRoute()
@@ -68,6 +69,7 @@ const communityLinks = computed(() => [{
<template #description>
<MDC
v-if="page.description"
:cache-key="`${kebabCase(route.path)}-description`"
:value="page.description"
unwrap="p"
/>
24 changes: 12 additions & 12 deletions docs/app/pages/studio/pricing.vue
Original file line number Diff line number Diff line change
@@ -69,14 +69,14 @@ const data = computed(() => {
const cell = (type: 'solo' | 'team' | 'unlimited', row: any) => {
const value = row.original[type]
const color = value === 'Coming soon'
? '!text-[var(--ui-text-muted)]'
: type === 'team' ? 'text-[var(--ui-primary)]' : 'text-[var(--ui-text-highlighted)]'
? '!text-(--ui-text-muted)'
: type === 'team' ? 'text-(--ui-primary)' : 'text-(--ui-text-highlighted)'
const background = type === 'team' ? 'bg-gray-300/10 dark:bg-gray-800/50' : ''
const borderBottom = row.original.main ? 'border-b border-[var(--ui-color-neutral-100)] dark:border-[var(--ui-color-neutral-800)]' : ''
const borderSide = type === 'team' ? 'border-l border-r !border-r-[var(--ui-primary)] !border-l-[var(--ui-primary)]' : ''
const borderClosed = type === 'team' && row.original.title?.includes('Commit') ? 'border-b border-b-[var(--ui-primary)] rounded-b-lg' : ''
const borderBottom = row.original.main ? 'border-b border-(--ui-color-neutral-100) dark:border-(--ui-color-neutral-800)' : ''
const borderSide = type === 'team' ? 'border-l border-r !border-r-(--ui-primary) !border-l-(--ui-primary)' : ''
const borderClosed = type === 'team' && row.original.title?.includes('Commit') ? 'border-b border-b-(--ui-primary) rounded-b-lg' : ''
return h('div', { class: `flex justify-center border-primary p-4 text-[var(--ui-text-highlighted)] ${color} ${background} ${borderBottom} ${borderSide} ${borderClosed}` },
return h('div', { class: `flex justify-center border-primary p-4 text-(--ui-text-highlighted) ${color} ${background} ${borderBottom} ${borderSide} ${borderClosed}` },
typeof value === 'string'
? h('span', { class: 'h-5' }, value)
: value === true
@@ -86,11 +86,11 @@ const cell = (type: 'solo' | 'team' | 'unlimited', row: any) => {
}
const header = (type: 'solo' | 'team' | 'unlimited') => {
const border = type === 'team' ? 'border-l border-r border-t border-[var(--ui-primary)] rounded-t-lg' : ''
const gradient = type === 'team' ? 'bg-gradient-to-b from-[var(--ui-primary)]/10 to-gray-300/10 dark:from-[var(--ui-primary)]/20 dark:to-gray-800/50' : ''
const border = type === 'team' ? 'border-l border-r border-t border-(--ui-primary) rounded-t-lg' : ''
const gradient = type === 'team' ? 'bg-gradient-to-b from-(--ui-primary)/10 to-gray-300/10 dark:from-(--ui-primary)/20 dark:to-gray-800/50' : ''
return h('div', { class: `flex flex-col items-center p-4 ${border} ${gradient}` }, [
h('span', { class: 'text-lg font-semibold' }, page.value?.plans?.[type]?.title),
h('span', { class: 'text-sm text-[var(--ui-text-muted)]' }, `${page.value?.plans?.[type]?.price}${page.value?.plans?.[type]?.cycle}`),
h('span', { class: 'text-sm text-(--ui-text-muted)' }, `${page.value?.plans?.[type]?.price}${page.value?.plans?.[type]?.cycle}`),
])
}
@@ -100,8 +100,8 @@ const columns: TableColumn<Feature>[] = [
header: '',
cell: ({ row }) => {
return row.original.main
? h('span', { class: 'flex text-[var(--ui-text-highlighted)] font-medium border-b border-[var(--ui-color-neutral-100)] dark:border-[var(--ui-color-neutral-800)] p-4 w-full' }, row.original.title)
: h('span', { class: 'text-[var(--ui-text-muted)] p-4' }, row.original.title)
? h('span', { class: 'flex text-(--ui-text-highlighted) font-medium border-b border-(--ui-color-neutral-100) dark:border-(--ui-color-neutral-800) p-4 w-full' }, row.original.title)
: h('span', { class: 'text-(--ui-text-muted) p-4' }, row.original.title)
},
},
{
@@ -142,7 +142,7 @@ const columns: TableColumn<Feature>[] = [
<UPageSection
:title="page.onboarding.title"
:ui="{
root: 'bg-[var(--ui-bg-elevated)]/25 border-t border-b border-[var(--ui-border)] mt-8 sm:mt-12 lg:mt-16',
root: 'bg-(--ui-bg-elevated)/25 border-t border-b border-(--ui-border) mt-8 sm:mt-12 lg:mt-16',
container: 'py-8 sm:py-12 lg:py-16',
}"
>
2 changes: 1 addition & 1 deletion docs/app/pages/templates/index.vue
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ useSeoMeta({
:image="template.mainScreen"
:to="`/templates/${template.slug}`"
:ui="{
root: 'hover:ring-2 hover:ring-[var(--ui-primary)]',
root: 'hover:ring-2 hover:ring-(--ui-primary)',
description: 'text-pretty',
image: 'group-hover:scale-100',
header: 'aspect-auto',
56 changes: 28 additions & 28 deletions docs/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineContentConfig, defineCollection, z } from '@nuxt/content'

const pricingPlan = z.object({
const createPricingPlanSchema = () => z.object({
title: z.string(),
description: z.string(),
price: z.string(),
@@ -16,7 +16,7 @@ const pricingPlan = z.object({
}),
})

const pricingFeature = z.object({
const createPricingFeatureSchema = () => z.object({
title: z.string(),
plans: z.array(z.enum(['solo', 'team', 'unlimited'])).optional(),
value: z.array(z.string()).optional(),
@@ -67,65 +67,65 @@ export default defineContentConfig({
}),
}),
plans: z.object({
solo: pricingPlan,
team: pricingPlan,
unlimited: pricingPlan,
solo: createPricingPlanSchema(),
team: createPricingPlanSchema(),
unlimited: createPricingPlanSchema(),
}),
features: z.object({
title: z.string(),
description: z.string(),
includes: z.object({
projects: pricingFeature,
members: pricingFeature,
media: pricingFeature,
support: pricingFeature,
dedicated: pricingFeature,
roles: pricingFeature,
collaboration: pricingFeature,
projects: createPricingFeatureSchema(),
members: createPricingFeatureSchema(),
media: createPricingFeatureSchema(),
support: createPricingFeatureSchema(),
dedicated: createPricingFeatureSchema(),
roles: createPricingFeatureSchema(),
collaboration: createPricingFeatureSchema(),
sync: z.object({
title: z.string(),
includes: z.object({
repositories: pricingFeature,
workflow: pricingFeature,
repositories: createPricingFeatureSchema(),
workflow: createPricingFeatureSchema(),
}),
}),
project: z.object({
title: z.string(),
includes: z.object({
clone: pricingFeature,
import: pricingFeature,
clone: createPricingFeatureSchema(),
import: createPricingFeatureSchema(),
}),
}),
editors: z.object({
title: z.string(),
includes: z.object({
markdown: pricingFeature,
json: pricingFeature,
appconfig: pricingFeature,
drag: pricingFeature,
markdown: createPricingFeatureSchema(),
json: createPricingFeatureSchema(),
appconfig: createPricingFeatureSchema(),
drag: createPricingFeatureSchema(),
}),
}),
preview: z.object({
title: z.string(),
includes: z.object({
draft: pricingFeature,
branches: pricingFeature,
prs: pricingFeature,
draft: createPricingFeatureSchema(),
branches: createPricingFeatureSchema(),
prs: createPricingFeatureSchema(),
}),
}),
deploy: z.object({
title: z.string(),
includes: z.object({
gh: pricingFeature,
self: pricingFeature,
gh: createPricingFeatureSchema(),
self: createPricingFeatureSchema(),
}),
}),
publish: z.object({
title: z.string(),
includes: z.object({
preview: pricingFeature,
branch: pricingFeature,
commit: pricingFeature,
preview: createPricingFeatureSchema(),
branch: createPricingFeatureSchema(),
commit: createPricingFeatureSchema(),
}),
}),
}),
7 changes: 4 additions & 3 deletions docs/content/blog/ui-pro-docs-migration.md
Original file line number Diff line number Diff line change
@@ -294,7 +294,7 @@ It's no longer required to add `@nuxt/ui` in modules as it is automatically impo
#### Import Tailwind CSS and Nuxt UI Pro in your CSS

```css [assets/css/main.css]
@import "tailwindcss";
@import "tailwindcss" theme(static);
@import "@nuxt/ui-pro";
```

@@ -314,7 +314,7 @@ Nuxt UI v3 uses Tailwind CSS v4 that follows a CSS-first configuration approach.
- Use the `@source` directive in order for Tailwind to detect classes in `markdown` files.

```css [assets/css/main.css]
@import "tailwindcss";
@import "tailwindcss" theme(static);
@import "@nuxt/ui-pro";

@source "../content/**/*";
@@ -559,11 +559,12 @@ export default defineContentConfig({
</template>
<template #title>
<MDC :value="page.hero.title" />
<MDC cache-key="head-title" :value="page.hero.title" />
</template>
<MDC
:value="page.hero.code"
cache-key="head-code"
class="prose prose-primary dark:prose-invert mx-auto"
/>
</ULandingHero>
40 changes: 38 additions & 2 deletions docs/content/docs/2.collections/3.sources.md
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ The `source` property can be defined as either a string (following a glob patter
- `source: '**/*.{json,yml}'` includes `JSON` or `YML` file within the content directory and all its subdirectories.
- `source: '*.json'` includes only `JSON` files located directly within the content directory, excluding any subdirectories.

### `include`
### `include` (required)

Glob pattern of your target repository and files in the content folder.

@@ -80,8 +80,44 @@ source: {

### `repository`

External source representing a remote git repository URL (e.g., <https://github.com/nuxt/content>)
External source representing a remote git repository URL (e.g., <https://github.com/nuxt/content>).

When defining an external source you must also define the `include` option.
`include` pattern is essential for the module to know which files to use for the collection.

```js
import { defineCollection, defineContentConfig } from '@nuxt/content'

export default defineContentConfig({
collections: {
docs: defineCollection({
type: 'page'
source: {
repository: 'https://github.com/nuxt/content',
include: 'docs/content/**',
},
})
}
})
```

### `authToken`

Authentication token for private repositories (e.g., GitHub personal access token).

### `authBasic`

Basic authentication for private repositories (e.g., Bitbucket username and password).

```ts
defineCollection({
type: 'page',
source: {
repository: 'https://bitbucket.org/username/repo',
authBasic: {
username: 'username',
password: 'password',
},
},
})
```
Loading