Skip to content

Upgrading @nuxt/content 1 to 2

Breaking1.15.1 → 2.13.4Breaking6Security3Deprecated2New52Changed44Fixed220Other255

BreakingUpgrade verdict

6 breaking changes and 3 security fixes.

  • If you use a Shiki Material theme for code highlighting, its name has changed, so you must update your configuration.
  • If you read the `class` property from parsed content, it is now a list of values instead of a single value.
  • The link component now uses target instead of blank.
  • An option name was misspelled and is now spelled correctly, so configurations using the old spelling must be updated.
Top 5 of 11 that need code or config changes

Adds @nuxt/kit ^3.13.2, @nuxtjs/mdc ^0.9.2, @vueuse/core ^11.1.0, @vueuse/head ^2.0.0, @vueuse/nuxt ^11.1.0, destr ^2.0.3, knitwork ^1.1.0, listhen ^1.9.0, mdast-util-to-string ^4.0.0, mdurl ^2.0.0, micromark ^4.0.0, micromark-util-sanitize-uri ^2.0.0, micromark-util-types ^2.0.0, minisearch ^7.1.0, ohash ^1.1.4, pathe ^1.1.2, scule ^1.3.0, shiki ^1.22.0, slugify ^1.6.6, socket.io-client ^4.8.0, ufo ^1.5.4, unist-util-stringify-position ^4.0.0, unstorage ^1.12.0.

Drops @lokidb/full-text-search, @lokidb/loki, @nuxt/types, @types/js-yaml, @types/xml2js, change-case, chokidar, csvtojson, detab, escape-html, graceful-fs, gray-matter, hasha, hookable, html-tags, js-yaml, mdast-util-to-hast, mkdirp, node-req, node-res, p-queue, prismjs, property-information, rehype-raw, rehype-sort-attribute-values, rehype-sort-attributes, remark-autolink-headings, remark-external-links, remark-footnotes, remark-gfm, remark-parse, remark-rehype, remark-slug, remark-squeeze-paragraphs, unified, unist-builder, xml2js.

Installs 265 packages in all (was 241).

Breaking6
Shiki's material themes are renamed from material-<themeName> to material-theme-<themeName> as of shiki@0.13.0.
highlight
Slightly breaking change in Package internals due to remark upgrade: class properties are now arrays.
class
Replaces the blank prop with target in markdown-link.
blanktarget
Spells extensions correctly, renaming the previous misspelled option.
extensions
Spells the extensions option correctly, breaking the previous misspelled name.
extensions
Changes descending sort value from 0 to -1 to match Mongo sort syntax.
queryContent().sort()
Security3
Prevents script execution from markdown content.
Sanitizes highlighted text in Shiki.
Shiki
Adds XSS prevention in markdown rendering.
Deprecated2
Deprecates <Markdown> in favor of the new <ContentSlot /> component with the same usage.
<Markdown><ContentSlot />
Deprecates the markdown component.

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • added: const __VLS_directiveBindingRestFields: { instance: null; oldValue: null; modifiers: any; dir: any }
  • added: const __VLS_intrinsicElements: __VLS_IntrinsicElements
  • added: const __VLS_nativeElements: { a: HTMLAnchorElement; abbr: HTMLElement; address: HTMLElement; area: HTMLAreaElement; article: HTMLElement; aside: HTMLElement; audio: HTMLAudioElement; b: H…
  • added: const __VLS_unref: typeof import('vue').unref
  • added: function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K): T extends new (...args: any) => any ? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & { __ctx?: { attrs?: any; slots?: K extends { $slots: infer Slots } ? Slots : any; emit?: K extends { $emit: infer Em…
  • added: function __VLS_directiveAsFunction<T extends import('vue').Directive>(dir: T): T extends (...args: any) => any ? T | __VLS_unknownDirective : NonNullable<(T & Record<string, __VLS_unknownDirective>)['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
  • added: function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void
  • added: function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : []
  • added: function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0]
  • added: function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>
  • added: function __VLS_getVForSourceType(source: number): [number, number, number][]
  • added: function __VLS_getVForSourceType(source: string): [string, number, number][]
  • added: function __VLS_getVForSourceType<T extends any[]>(source: T): [item: T[number], key: number, index: number][]
  • added: function __VLS_getVForSourceType<T extends number | { [Symbol.iterator](): Iterator<any> }>(source: T): [item: number | (Exclude<T, number> extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never), key: number, index: undefined][]
  • added: function __VLS_getVForSourceType<T extends { [Symbol.iterator](): Iterator<any> }>(source: T): [item: T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never, key: number, index: undefined][]
  • added: function __VLS_getVForSourceType<T>(source: T): [item: T[keyof T], key: keyof T, index: number][]
  • added: function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] }
  • added: function __VLS_nonNullable<T>(t: T): T extends null | undefined ? never : T
  • added: function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S
  • added: function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): NonNullable<__VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>>
  • added: function __VLS_tryAsConstant<const T>(t: T): T
  • added: function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K
  • added: type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F ? F extends (event: infer E, ...args: infer A) => any ? { [K in E & string]: (...args: A) => void } : never : never
  • added: type __VLS_Element = import('vue/jsx-runtime').JSX.Element
  • added: type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never : T extends (props: infer P, ...args: any) =…
  • added: type __VLS_GlobalComponents = import('vue').GlobalComponents & Pick<typeof import('vue'), 'Transition' | 'TransitionGroup' | 'KeepAlive' | 'Suspense' | 'Teleport'>
  • added: type __VLS_GlobalDirectives = import('vue').GlobalDirectives
  • added: type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements
  • added: type __VLS_IsAny<T> = 0 extends 1 & T ? true : false
  • added: type __VLS_IsFunction<T, K> = K extends keyof T ? __VLS_IsAny<T[K]> extends false ? unknown extends T[K] ? false : true : false : false
  • added: type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<__VLS_UnionToIntersection<__VLS_ConstructorOverloads<T> & { [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never }>>
  • added: type __VLS_OverloadUnion<T> = Exclude<__VLS_OverloadUnionInner<(() => never) & T>, T extends () => never ? never : () => never>
  • added: type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R ? U extends T ? never : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) =>…
  • added: type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A
  • added: type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K] } & {}
  • added: type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never
  • added: type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> = N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :…
  • added: type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void
  • added: interface NuxtHooks extends ModuleHooks
  • added: interface PrivateRuntimeConfig
  • added: interface PublicRuntimeConfig
  • added: property PrivateRuntimeConfig.content: ModulePrivateRuntimeConfig & ContentContext
  • added: property PublicRuntimeConfig.content: ModulePublicRuntimeConfig
  • removed: interface Configuration
  • removed: interface Context
  • removed: property Configuration.content?: IContentOptions
  • removed: property Context.$content: contentFunc
  • removed: interface NuxtOptionsHooks
  • removed: property NuxtOptionsHooks.'content:file:beforeInsert'?: contentFileBeforeInstert
  • removed: property NuxtOptionsHooks.'content:file:beforeParse'?: contentFileBeforeParse
  • removed: property NuxtOptionsHooks.content?: { file?: { beforeInsert?: contentFileBeforeInstert; beforeParse?: contentFileBeforeParse } }
  • removed: interface Context
  • removed: property Context.$content: contentFunc
  • added: interface TokenTypeMap
  • added: property TokenTypeMap.column: 'column'
  • added: property TokenTypeMap.columnSeparator: 'columnSeparator'
  • added: property TokenTypeMap.emptyLine: 'emptyLine'
  • added: property TokenTypeMap.newline: 'newline'
  • added: property TokenTypeMap.quoteFence: 'quoteFence'
  • added: property TokenTypeMap.quotedData: 'quotedData'
  • added: property TokenTypeMap.quotedDataChunk: 'quotedDataChunk'
  • added: property TokenTypeMap.row: 'row'
  • added: interface NitroRuntimeHooks
  • added: property NitroRuntimeHooks.'content:file:afterParse': (file: ParsedContent) => void
  • added: property NitroRuntimeHooks.'content:file:beforeParse': (file: { _id: string; body: string }) => void
  • added: interface GlobalComponents
  • added: interface GlobalDirectives
  • removed: interface Vue
  • removed: property Vue.$content: contentFunc
  • removed: interface Store<S>
  • removed: property Store.$content: contentFunc
  • added: const default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>
  • added: declare module '@nuxt/schema'
  • added: declare module 'nitropack'
  • added: index ContentQueryBuilderParams[key: string]: any
  • added: index ContentQueryBuilderWhere[key: string]: string | number | boolean | RegExp | ContentQueryBuilderWhere | Array<string | number | boolean | ContentQueryBuilderWhere> | undefined
  • added: index ContentQuerySortFields[field: string]: -1 | 1
  • added: index NavItem[key: string]: any
  • added: index ParsedContentMeta[key: string]: any
  • added: index QueryBuilderParams[key: string]: any
  • added: index QueryBuilderWhere[key: string]: undefined | string | number | boolean | RegExp | QueryBuilderWhere | Array<string | number | boolean | QueryBuilderWhere>
  • added: index SortFields[field: string]: -1 | 1
  • added: index TransformContentOptions[key: string]: any
  • added: interface ContentContext extends ModuleOptions
  • added: interface ContentQueryBuilder<T = ParsedContentMeta, Y = Record<string, any>>
  • added: interface ContentQueryBuilderParams
  • added: interface ContentQueryBuilderWhere extends Partial<Record<keyof ParsedContentInternalMeta, string | number | boolean | RegExp | ContentQueryBuilderWhere>>
  • added: interface ContentQueryCountResponse
  • added: interface ContentQueryFindOneResponse<T>
  • added: interface ContentQueryFindResponse<T>
  • added: interface ContentQuerySortFields
  • added: interface ContentQuerySortParams
  • added: interface ContentQueryWithDirConfig
  • added: interface ContentQueryWithSurround<T>
  • added: interface ContentTransformer
  • added: interface MarkdownHtmlNode extends MarkdownNode
  • added: interface MarkdownNode
  • added: interface MarkdownOptions
  • added: interface MarkdownParsedContent extends ParsedContent
  • added: interface MarkdownRoot
  • added: interface ModuleHooks
  • added: interface ModuleOptions
  • added: interface NavItem
  • added: interface ParsedContent extends ParsedContentMeta
  • added: interface ParsedContentInternalMeta
  • added: interface ParsedContentMeta extends ParsedContentInternalMeta
  • added: interface QueryBuilder<T = ParsedContentMeta>
  • added: interface QueryBuilderParams
  • added: interface QueryBuilderWhere extends Partial<Record<keyof ParsedContentInternalMeta, string | number | boolean | RegExp | QueryBuilderWhere>>
  • added: interface SortFields
  • added: interface SortParams
  • added: interface Toc
  • added: interface TocLink
  • added: interface TransformContentOptions
  • added: method ContentQueryBuilder.count(): Promise<ContentQueryCountResponse>
  • added: method ContentQueryBuilder.find(): Promise<ContentQueryFindResponse<T> & Y>
  • added: method ContentQueryBuilder.findOne(): Promise<ContentQueryFindOneResponse<T> & Y>
  • added: method ContentQueryBuilder.limit(count: number): ContentQueryBuilder<T, Y>
  • added: method ContentQueryBuilder.locale(locale: string): ContentQueryBuilder<T, Y>
  • added: method ContentQueryBuilder.only<T, K extends ValidKey<T>>(keys: K): ContentQueryBuilder<Pick<T, Extract<K, keyof T>>, Y>
  • added: method ContentQueryBuilder.only<T, K extends ValidKeys<T>>(keys: K): ContentQueryBuilder<Pick<T, Extract<K[number], keyof T>>, Y>
  • added: method ContentQueryBuilder.skip(count: number): ContentQueryBuilder<T, Y>
  • added: method ContentQueryBuilder.sort(options: ContentQuerySortOptions): ContentQueryBuilder<T, Y>
  • added: method ContentQueryBuilder.where(query: ContentQueryBuilderWhere): ContentQueryBuilder<T, Y>
  • added: method ContentQueryBuilder.withDirConfig(): ContentQueryBuilder<T, ContentQueryWithDirConfig>
  • added: method ContentQueryBuilder.withSurround(query: string | ContentQueryBuilderWhere, options?: Partial<{ before: number; after: number }>): ContentQueryBuilder<T, ContentQueryWithSurround<T>>
  • added: method ContentQueryBuilder.without<const K extends (keyof T | string)[]>(keys: K): ContentQueryBuilder<Omit<T, K[number]>, Y>
  • added: method ContentQueryBuilder.without<const K extends keyof T | string>(keys: K): ContentQueryBuilder<Omit<T, K>, Y>
  • added: method ContentTransformer.parse?(id: string, content: StorageValue, options: any): Promise<ParsedContent> | ParsedContent
  • added: method ContentTransformer.transform?(content: ParsedContent, options: any): Promise<ParsedContent> | ParsedContent
  • added: method ModuleHooks.'content:context'(ctx: ContentContext): void
  • added: method QueryBuilder.count(): Promise<number>
  • added: method QueryBuilder.find(): Promise<Array<T>>
  • added: method QueryBuilder.findOne(): Promise<T>
  • added: method QueryBuilder.findSurround(query: string | QueryBuilderWhere, options?: Partial<{ before: number; after: number }>): Promise<Array<T>>
  • added: method QueryBuilder.limit(count: number): QueryBuilder<T>
  • added: method QueryBuilder.locale(locale: string): QueryBuilder<T>
  • added: method QueryBuilder.only<const K extends (keyof T)[]>(keys: K): QueryBuilder<Pick<T, K[number]>>
  • added: method QueryBuilder.only<const K extends keyof T>(keys: K): QueryBuilder<Pick<T, K>>
  • added: method QueryBuilder.skip(count: number): QueryBuilder<T>
  • added: method QueryBuilder.sort(options: SortOptions): QueryBuilder<T>
  • added: method QueryBuilder.where(query: QueryBuilderWhere): QueryBuilder<T>
  • added: method QueryBuilder.without<const K extends (keyof T | string)[]>(keys: K): QueryBuilder<Omit<T, K[number]>>
  • added: method QueryBuilder.without<const K extends keyof T | string>(keys: K): QueryBuilder<Omit<T, K>>
  • added: property ContentContext.base: Readonly<string>
  • added: property ContentContext.transformers: Array<string>
  • added: property ContentQueryBuilder.params: () => ContentQueryBuilderParams
  • added: property ContentQueryBuilderParams.first?: boolean
  • added: property ContentQueryBuilderParams.limit?: number
  • added: property ContentQueryBuilderParams.only?: string[]
  • added: property ContentQueryBuilderParams.skip?: number
  • added: property ContentQueryBuilderParams.sort?: ContentQuerySortOptions[]
  • added: property ContentQueryBuilderParams.surround?: { query: string | ContentQueryBuilderWhere; before?: number; after?: number }
  • added: property ContentQueryBuilderParams.where?: ContentQueryBuilderWhere[]
  • added: property ContentQueryBuilderParams.without?: string[]
  • added: property ContentQueryBuilderWhere.$and?: ContentQueryBuilderWhere[]
  • added: property ContentQueryBuilderWhere.$contains?: Array<string | number | boolean> | string | number | boolean
  • added: property ContentQueryBuilderWhere.$containsAny?: Array<string | number | boolean>
  • added: property ContentQueryBuilderWhere.$eq?: string | number | boolean | RegExp
  • added: property ContentQueryBuilderWhere.$exists?: boolean
  • added: property ContentQueryBuilderWhere.$gt?: number | string
  • added: property ContentQueryBuilderWhere.$gte?: number | string
  • added: property ContentQueryBuilderWhere.$icontains?: string
  • added: property ContentQueryBuilderWhere.$in?: Array<string | number | boolean>
  • added: property ContentQueryBuilderWhere.$lt?: number | string
  • added: property ContentQueryBuilderWhere.$lte?: number | string
  • added: property ContentQueryBuilderWhere.$ne?: string | number | boolean | RegExp
  • added: property ContentQueryBuilderWhere.$not?: string | number | boolean | RegExp | ContentQueryBuilderWhere
  • added: property ContentQueryBuilderWhere.$or?: ContentQueryBuilderWhere[]
  • added: property ContentQueryBuilderWhere.$regex?: RegExp | string
  • added: property ContentQueryBuilderWhere.$type?: string
  • added: property ContentQueryCountResponse.result: number
  • added: property ContentQueryFindOneResponse.result: T | undefined
  • added: property ContentQueryFindResponse.limit: number
  • added: property ContentQueryFindResponse.result: Array<T>
  • added: property ContentQueryFindResponse.skip: number
  • added: property ContentQueryFindResponse.total: number
  • added: property ContentQuerySortParams.$caseFirst?: 'upper' | 'lower' | 'false'
  • added: property ContentQuerySortParams.$locale?: string
  • added: property ContentQuerySortParams.$numeric?: boolean
  • added: property ContentQuerySortParams.$sensitivity?: 'base' | 'accent' | 'case' | 'variant'
  • added: property ContentQueryWithDirConfig.dirConfig: Record<string, any>
  • added: property ContentQueryWithSurround.surround: Array<T | null>
  • added: property ContentTransformer.extensions: string[]
  • added: property ContentTransformer.name: string
  • added: property MarkdownHtmlNode.type: 'html'
  • added: property MarkdownHtmlNode.value: string
  • added: property MarkdownNode.attributes?: Record<string, any>
  • added: property MarkdownNode.children?: MarkdownNode[]
  • added: property MarkdownNode.content?: any
  • added: property MarkdownNode.fmAttributes?: Record<string, any>
  • added: property MarkdownNode.props?: Record<string, any>
  • added: property MarkdownNode.tag?: string
  • added: property MarkdownNode.type: string
  • added: property MarkdownNode.value?: string
  • added: property MarkdownOptions.mdc: boolean
  • added: property MarkdownOptions.rehypePlugins: Record<string, false | (MarkdownPlugin & { instance: any })>
  • added: property MarkdownOptions.remarkPlugins: Record<string, false | (MarkdownPlugin & { instance: any })>
  • added: property MarkdownOptions.tags: Record<string, string>
  • added: property MarkdownOptions.toc: { depth: number; searchDepth: number }
  • added: property MarkdownParsedContent._empty: boolean
  • added: property MarkdownParsedContent._type: 'markdown'
  • added: property MarkdownParsedContent.body: MarkdownRoot & { toc?: Toc }
  • added: property MarkdownParsedContent.description: string
  • added: property MarkdownParsedContent.excerpt?: MarkdownRoot
  • added: property MarkdownRoot.children: MarkdownNode[]
  • added: property MarkdownRoot.props?: Record<string, any>
  • added: property MarkdownRoot.toc?: Toc
  • added: property MarkdownRoot.type: 'root'
  • added: property ModuleOptions.api: { baseURL: string }
  • added: property ModuleOptions.base: string
  • added: property ModuleOptions.contentHead?: boolean
  • added: property ModuleOptions.csv: false | { json?: boolean; delimeter?: string }
  • added: property ModuleOptions.defaultLocale?: string
  • added: property ModuleOptions.documentDriven: boolean | { host?: string; page?: boolean; navigation?: boolean; surround?: boolean; globals?: { [key: string]: QueryBuilderParams }; layoutFallbacks?: string[]; injectPage?: boolean; trailingSlash?: boolean }
  • added: property ModuleOptions.experimental: { clientDB?: boolean; stripQueryParameters?: boolean; advanceQuery?: boolean; cacheContents?: boolean; search?: { ignoredTags?: Array<string>; filterQuery?: QueryBuilderWhere; indexed?: boolean; options?: Options } }
  • added: property ModuleOptions.highlight: false | { theme?: BuiltinTheme | { default: BuiltinTheme; [theme: string]: BuiltinTheme }; preload?: (BuiltinLanguage | LanguageRegistration)[]; langs?: (BuiltinLanguage | LanguageRegistration)[]; themes?: (BuiltinTheme | ThemeRegistrationAny)[] }
  • added: property ModuleOptions.ignores: Array<string>
  • added: property ModuleOptions.locales: Array<string>
  • added: property ModuleOptions.markdown: { mdc?: boolean; toc?: { depth?: number; searchDepth?: number }; tags?: Record<string, string>; remarkPlugins?: Array<string | [string, MarkdownPlugin]> | Record<string, false | MarkdownPlugin>; rehypePlugins?: Array<string | [string, MarkdownPlugin]> | Record<string, false | MarkdownPlugin>; anchorLinks?: boolean | { depth?: number; exclude?: number[] } }
  • added: property ModuleOptions.navigation: false | { fields: Array<string> }
  • added: property ModuleOptions.respectPathCase: boolean
  • added: property ModuleOptions.sources: Record<string, MountOptions> | Array<string | MountOptions>
  • added: property ModuleOptions.watch: false | { ws: Partial<ListenOptions> }
  • added: property ModuleOptions.yaml: false | Record<string, any>
  • added: property NavItem._draft?: boolean
  • added: property NavItem._id?: string
  • added: property NavItem._path: string
  • added: property NavItem.children?: NavItem[]
  • added: property NavItem.title: string
  • added: property ParsedContent.body: MarkdownRoot | null
  • added: property ParsedContent.excerpt?: MarkdownRoot
  • added: property ParsedContentInternalMeta._draft?: boolean
  • added: property ParsedContentInternalMeta._extension?: 'md' | 'yaml' | 'yml' | 'json' | 'json5' | 'csv'
  • added: property ParsedContentInternalMeta._file?: string
  • added: property ParsedContentInternalMeta._id: string
  • added: property ParsedContentInternalMeta._locale?: string
  • added: property ParsedContentInternalMeta._partial?: boolean
  • added: property ParsedContentInternalMeta._path?: string
  • added: property ParsedContentInternalMeta._source?: string
  • added: property ParsedContentInternalMeta._type?: 'markdown' | 'yaml' | 'json' | 'csv'
  • added: property ParsedContentInternalMeta.title?: string
  • added: property ParsedContentMeta.layout?: LayoutKey
  • added: property QueryBuilder.params: () => QueryBuilderParams
  • added: property QueryBuilderParams.first?: boolean
  • added: property QueryBuilderParams.limit?: number
  • added: property QueryBuilderParams.only?: string[]
  • added: property QueryBuilderParams.skip?: number
  • added: property QueryBuilderParams.sort?: SortOptions[]
  • added: property QueryBuilderParams.surround?: { query: string | QueryBuilderWhere; before?: number; after?: number }
  • added: property QueryBuilderParams.where?: QueryBuilderWhere[]
  • added: property QueryBuilderParams.without?: string[]
  • added: property QueryBuilderWhere.$and?: QueryBuilderWhere[]
  • added: property QueryBuilderWhere.$contains?: Array<string | number | boolean> | string | number | boolean
  • added: property QueryBuilderWhere.$containsAny?: Array<string | number | boolean>
  • added: property QueryBuilderWhere.$eq?: string | number | boolean | RegExp
  • added: property QueryBuilderWhere.$exists?: boolean
  • added: property QueryBuilderWhere.$gt?: number
  • added: property QueryBuilderWhere.$gte?: number
  • added: property QueryBuilderWhere.$icontains?: string
  • added: property QueryBuilderWhere.$in?: string | Array<string | number | boolean>
  • added: property QueryBuilderWhere.$lt?: number
  • added: property QueryBuilderWhere.$lte?: number
  • added: property QueryBuilderWhere.$ne?: string | number | boolean | RegExp
  • added: property QueryBuilderWhere.$not?: string | number | boolean | RegExp | QueryBuilderWhere
  • added: property QueryBuilderWhere.$or?: QueryBuilderWhere[]
  • added: property QueryBuilderWhere.$regex?: RegExp | string
  • added: property QueryBuilderWhere.$type?: string
  • added: property SortParams.$caseFirst?: 'upper' | 'lower' | 'false'
  • added: property SortParams.$locale?: string
  • added: property SortParams.$numeric?: boolean
  • added: property SortParams.$sensitivity?: 'base' | 'accent' | 'case' | 'variant'
  • added: property Toc.depth: number
  • added: property Toc.links: TocLink[]
  • added: property Toc.searchDepth: number
  • added: property Toc.title: string
  • added: property TocLink.children?: TocLink[]
  • added: property TocLink.depth: number
  • added: property TocLink.id: string
  • added: property TocLink.text: string
  • added: property TransformContentOptions.transformers?: ContentTransformer[]
  • added: type ContentQueryFetcher<T> = (query: ContentQueryBuilder<T>) => Promise<ContentQueryResponse<T>>
  • added: type ContentQueryResponse<T> = ContentQueryFindResponse<T> | ContentQueryFindOneResponse<T> | ContentQueryCountResponse
  • added: type ContentQuerySortOptions = ContentQuerySortParams | ContentQuerySortFields
  • added: type DatabaseFetcher<T> = (query: QueryBuilder<T>) => Promise<Array<T> | T>
  • added: type MarkdownPlugin = Record<string, any>
  • added: type MountOptions = { driver: 'fs' | 'http' | string; name?: string; prefix?: string; [options: string]: any }
  • added: type QueryMatchOperator = (item: any, condition: any) => boolean
  • added: type QueryPipe<T = any> = ((data: Array<T>, param: QueryBuilderParams) => Array<T>) | ((data: Array<T>, param: QueryBuilderParams) => void)
  • added: type SortOptions = SortParams | SortFields
  • added: const _default: typeof ContentDoc & { new (): { $slots: { default: (context: { doc: ParsedContent; refresh: () => Promise<void> }) => VNode[] | undefined } } }
  • added: declare global
  • added: declare module 'vue'
  • added: default _default
  • added: const _default: typeof ContentList & { new (): { $slots: { default: (context: { list: ParsedContent[]; refresh: () => Promise<void> }) => VNode[] | undefined } } }
  • added: default _default
  • added: const _default: typeof ContentNavigation & { new (): { $slots: { default: ({ navigation }: { navigation: NavItem[] }) => VNode[] | undefined } } }
  • added: default _default
  • added: const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{ value: { type: ObjectConstructor; required: false; default: () => {} }; excerpt: { type: Boolean…
  • added: default _default
  • added: const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{ use: { type: FunctionConstructor; default: undefined }; unwrap: { type: (StringConstructor | Boo…
  • added: default _default
  • added: const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{ value: { type: PropType<ParsedContent>; required: true } }>, {}, {}, {}, {}, import('vue').Compo…
  • added: default _default
  • added: const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicPro…
  • added: default _default
  • added: const _default: import('vue').DefineComponent<{}, { fallbackSlot: import('vue').Slot<any> | undefined; tags: import('vue').ComputedRef<string[]>; between: import('vue').Slot<a…
  • added: default _default
  • added: const contentStorage: Storage<StorageValue>
  • added: function createDB(storage: Storage): { storage: Storage<StorageValue>; fetch: (query: NavItem<unknown>) => Promise<NavItem<unknown>>; query: (initialParams?: any) => ContentQueryBuilder<T> }
  • added: function generateNavigation(query?: ContentQueryBuilderParams): Promise<Array<NavItem>>
  • added: function useContentDatabase(): Promise<{ storage: Storage<StorageValue>; fetch: (query: NavItem<unknown>) => Promise<NavItem<unknown>>; query: (initialParams?: any) => ContentQueryBuilder<T> }>
  • added: const useContent: <T extends ParsedContent, G extends object = Record<string, unknown>>() => { globals: import('vue').Ref<Record<string, G>, Record<string, G>>; navigation: impo…
  • added: const useContentState: <G extends object = Record<string, unknown>>() => { pages: import('vue').Ref<Record<string, ParsedContent>, Record<string, ParsedContent>>; surrounds: import('…
  • added: const useContentHead: (_content: ParsedContent | Ref<ParsedContent>, to?: RouteLocationNormalized | RouteLocationNormalizedLoaded) => void
  • added: const useContentHelpers: () => { navBottomLink: (link: NavItem) => string | undefined; navDirFromPath: (path: string, tree: NavItem[]) => NavItem[] | undefined; navPageFromPath: (path:…
  • added: const fetchContentNavigation: (queryBuilder?: QueryBuilder | QueryBuilderParams | ContentQueryBuilder) => Promise<Array<NavItem>>
  • added: const useContentPreview: () => { isEnabled: () => boolean; getPreviewToken: () => string | undefined; setPreviewToken: (token: string | undefined) => void }
  • added: const createQueryFetch: <T = ParsedContent>() => (query: ContentQueryBuilder<T>) => Promise<any>
  • added: function queryContent<T = ParsedContent>(query: string, ...pathParts: string[]): ContentQueryBuilder<T>
  • added: function queryContent<T = ParsedContent>(query?: ContentQueryBuilderParams): ContentQueryBuilder<T>
  • added: const defineMiniSearchOptions: <DataItem>(options: MiniSearchOptions<DataItem>) => Ref<{ fields: string[]; idField?: string | undefined; storeFields?: string[] | undefined; extractField?: ((…
  • added: const searchContent: <DataItem>(search: MaybeRefOrGetter<string>, options?: { miniSearch?: MaybeRefOrGetter<MiniSearchOptions<DataItem>> }) => Promise<import('vue').ComputedRef<imp…
  • added: const useUnwrap: () => { unwrap: typeof unwrap; flatUnwrap: typeof flatUnwrap }
  • added: const addPrerenderPath: (path: string) => void
  • added: const navigationDisabled: () => never
  • added: const shouldUseClientDB: () => boolean
  • added: const useContentDisabled: () => ReturnType<typeof useContent>
  • added: const withContentBase: (url: string) => string
  • added: function useContentWebSocket(): { connect: (retry?: boolean) => void } | undefined
  • added: const contentStorage: Storage
  • added: function createDB(storage: Storage): ClientDB
  • added: function generateNavigation(query?: QueryBuilderParams): Promise<Array<NavItem>>
  • added: function useContentDatabase(): Promise<ClientDB>
  • added: const fetchContentNavigation: (queryBuilder?: QueryBuilder | QueryBuilderParams | ContentQueryBuilder) => Promise<Array<NavItem>>
  • added: const createQueryFetch: <T = ParsedContent>() => (query: QueryBuilder<T>) => Promise<any>
  • added: function queryContent<T = ParsedContent>(query: string, ...pathParts: string[]): QueryBuilder<T>
  • added: function queryContent<T = ParsedContent>(query?: QueryBuilderParams): QueryBuilder<T>
  • added: const _default: import('#app/nuxt').Plugin<Record<string, unknown>> & import('#app/nuxt').ObjectPlugin<Record<string, unknown>>
  • added: default _default
  • added: const serverQueryContent: typeof legacyServerQueryContent
  • added: export { parseContent } from '../server/storage'
  • added: function serverQueryContent<T = ParsedContent>(event: H3Event, params?: QueryBuilderParams): QueryBuilder<T>
  • added: function serverQueryContent<T = ParsedContent>(event: H3Event, query?: string, ...pathParts: string[]): QueryBuilder<T>
  • added: const _default: import('#app/nuxt').Plugin<Record<string, unknown>> & import('#app/nuxt').ObjectPlugin<Record<string, unknown>>
  • added: default _default
  • added: const _default: import('nuxt/app').Plugin<Record<string, unknown>> & import('nuxt/app').ObjectPlugin<Record<string, unknown>>
  • added: default _default
  • added: function createMatch(opts?: MatchFactoryOptions): (item: any, conditions: any) => boolean
  • added: function createPipelineFetcher<T>(getContentsList: () => Promise<T[]>): (query: ContentQueryBuilder<T>) => Promise<ContentQueryResponse<T>>
  • added: function createPipelineFetcherLegacy<T>(getContentsList: () => Promise<T[]>): (query: QueryBuilder<T>) => Promise<T | T[]>
  • added: const apply: (fn: (d: any) => any) => (data: any) => any
  • added: const assertArray: (value: any, message?: string) => void
  • added: const detectProperties: (keys: string[]) => { prefixes: string[]; properties: string[] }
  • added: const ensureArray: <T>(value: T) => T extends Array<any> ? T : T[]
  • added: const get: (obj: any, path: string) => any
  • added: const omit: (keys?: string[]) => (obj: any) => any
  • added: const pick: (keys?: string[]) => (obj: any) => any
  • added: const sortList: (data: any[], params: SortOptions) => any[]
  • added: const withKeys: (keys?: string[]) => (obj: any) => any
  • added: const withoutKeys: (keys?: string[]) => (obj: any) => any
  • added: function createQuery<T = ParsedContent>(fetcher: ContentQueryFetcher<T>, opts: QueryOptions & { legacy: false }): ContentQueryBuilder<T>
  • added: function createQuery<T = ParsedContent>(fetcher: ContentQueryFetcher<T>, opts: QueryOptions & { legacy: true }): QueryBuilder<T>
  • added: const _default: import('h3').EventHandler<import('h3').EventHandlerRequest, Promise<{ generatedAt: number; generateTime: number; contents: any; navigation: NavItem[] }>>
  • added: default _default
  • added: const _default: import('h3').EventHandler<import('h3').EventHandlerRequest, Promise<string | number | true | object>>
  • added: default _default
  • added: const _default: import('h3').EventHandler<import('h3').EventHandlerRequest, Promise<any>>
  • added: default _default
  • added: const _default: import('h3').EventHandler<import('h3').EventHandlerRequest, Promise<string | { id: string; title: string; titles: string[]; level: number; content: string }[]>>
  • added: default _default
  • added: function getContentIndex(event: H3Event): Promise<Record<string, string[]>>
  • added: function getIndexedContentsList<T = ParsedContent>(event: H3Event, query: ContentQueryBuilder<T>): Promise<T[]>
  • added: export { parseContent } from './storage'
  • added: export { serverQueryContent } from './storage'
  • added: function createNav(contents: ParsedContentMeta[], configs: Record<string, ParsedContentMeta>): any[]
  • added: const _default: any
  • added: default _default
  • added: const getPreview: (event: H3Event) => { key: string | undefined }
  • added: const isPreview: (event: H3Event) => boolean
  • added: function serverSearchContent(event: H3Event, filterQuery?: QueryBuilderWhere): Promise<ParsedContent[]>
  • added: function splitPageIntoSections(page: ParsedContent, { ignoredTags }: { ignoredTags: string[] }): Section[]
  • added: const cacheParsedStorage: () => Storage<StorageValue>
  • added: const cacheStorage: () => Storage<StorageValue>
  • added: const cleanCachedContents: () => void
  • added: const createServerQueryFetch: <T = ParsedContent>(event: H3Event) => (query: ContentQueryBuilder<T>) => Promise<ContentQueryResponse<T_1>>
  • added: const getContent: (event: H3Event, id: string) => Promise<ParsedContent>
  • added: const getContentsIds: (event: H3Event, prefix?: string) => Promise<string[]>
  • added: const getContentsList: (event: H3Event, prefix?: string) => any
  • added: const parseContent: (id: string, content: StorageValue, opts?: ParseContentOptions) => Promise<any>
  • added: const sourceStorage: () => Storage<StorageValue>
  • added: function chunksFromArray<T>(arr: T[], n: number): Generator<T[], void>
  • added: function serverQueryContent<T = ParsedContent>(event: H3Event, params?: ContentQueryBuilderParams): ContentQueryBuilder<T>
  • added: function serverQueryContent<T = ParsedContent>(event: H3Event, query?: string, ...pathParts: string[]): ContentQueryBuilder<T>
  • added: const _default: ContentTransformer
  • added: default _default
  • added: function createTokenizer(parser: any, initialize: any, from: any): { previous: null; code: null; containerState: {}; events: never[]; parser: any; sliceStream: (token: any) => any; sliceSerialize: (token: any, expandTabs: any) => string; now: () => any; defineSkip: (value: any) => void; write: (slice: any) => never[] }
  • added: const fromCSV: (value: any, encoding?: any, options?: any) => Node
  • added: const _default: ContentTransformer
  • added: default _default
  • added: const parse: (options: any) => { previous: null; code: null; containerState: {}; events: never[]; parser: any; sliceStream: (token: any) => any; sliceSerialize: (token: any…
  • added: declare module 'micromark-util-types'
  • added: export { defineTransformer } from './utils'
  • added: function transformContent(id: string, content: StorageValue, options?: TransformContentOptions): Promise<any>
  • added: const _default: ContentTransformer
  • added: default _default
  • added: const _default: ContentTransformer
  • added: default _default
  • added: const _default: ContentTransformer
  • added: const describeId: (id: string) => { _source: string | undefined; _path: string; _extension: string | undefined; _file: string; _basename: string }
  • added: const generatePath: (path: string, { forceLeadingSlash, respectPathCase }?: { forceLeadingSlash?: boolean | undefined; respectPathCase?: boolean | undefined }) => string
  • added: const generateTitle: (path: string) => string
  • added: default _default
  • added: function refineUrlPart(name: string): string
  • added: const createSingleton: <T, Params extends Array<any>>(fn: (...arg: Params) => T) => (...args: Params) => T
  • added: const defineTransformer: (transformer: ContentTransformer) => ContentTransformer
  • added: const _default: ContentTransformer
  • added: default _default
  • added: function makeIgnored(ignores: string[]): (key: string) => boolean
  • added: const _default: string[]
  • added: default _default
  • added: function jsonParse(value: string): any
  • added: function jsonStringify(value: any): string
  • added: const decodeQueryParams: (encoded: string) => any
  • added: const encodeQueryParams: (params: ContentQueryBuilderParams) => string
  • added: const getContentQuery: (event: H3Event) => ContentQueryBuilderParams
  • added: const getParser: (extension: string) => ContentTransformer
  • added: const getTransformers: (extension: string) => ContentTransformer[]
  • added: declare module '@nuxt/schema'
  • added: export { ContentContext } from './module'
  • added: export { ContentQueryBuilder } from './module'
  • added: export { ContentQueryBuilderParams } from './module'
  • added: export { ContentQueryBuilderWhere } from './module'
  • added: export { ContentQueryCountResponse } from './module'
  • added: export { ContentQueryFetcher } from './module'
  • added: export { ContentQueryFindOneResponse } from './module'
  • added: export { ContentQueryFindResponse } from './module'
  • added: export { ContentQueryResponse } from './module'
  • added: export { ContentQuerySortFields } from './module'
  • added: export { ContentQuerySortOptions } from './module'
  • added: export { ContentQuerySortParams } from './module'
  • added: export { ContentQueryWithDirConfig } from './module'
  • added: export { ContentQueryWithSurround } from './module'
  • added: export { ContentTransformer } from './module'
  • added: export { DatabaseFetcher } from './module'
  • added: export { MarkdownHtmlNode } from './module'
  • added: export { MarkdownNode } from './module'
  • added: export { MarkdownOptions } from './module'
  • added: export { MarkdownParsedContent } from './module'
  • added: export { MarkdownPlugin } from './module'
  • added: export { MarkdownRoot } from './module'
  • added: export { ModuleHooks } from './module'
  • added: export { ModuleOptions } from './module'
  • added: export { MountOptions } from './module'
  • added: export { NavItem } from './module'
  • added: export { ParsedContent } from './module'
  • added: export { ParsedContentInternalMeta } from './module'
  • added: export { ParsedContentMeta } from './module'
  • added: export { QueryBuilder } from './module'
  • added: export { QueryBuilderParams } from './module'
  • added: export { QueryBuilderWhere } from './module'
  • added: export { QueryMatchOperator } from './module'
  • added: export { QueryPipe } from './module'
  • added: export { SortFields } from './module'
  • added: export { SortOptions } from './module'
  • added: export { SortParams } from './module'
  • added: export { Toc } from './module'
  • added: export { TocLink } from './module'
  • added: export { TransformContentOptions } from './module'
  • added: export { default } from './module'
  • removed: interface IContentDocument extends IContentDocumentBase
  • removed: interface IContentDocumentBase extends Record<string, any>
  • removed: property IContentDocument.createdAt: Date
  • removed: property IContentDocument.updatedAt: Date
  • removed: property IContentDocumentBase.body?: object
  • removed: property IContentDocumentBase.createdAt: Date | string
  • removed: property IContentDocumentBase.dir: string
  • removed: property IContentDocumentBase.extension: '.md' | '.json' | '.yaml' | '.xml' | '.csv' | string
  • removed: property IContentDocumentBase.path: string
  • removed: property IContentDocumentBase.slug: string
  • removed: property IContentDocumentBase.toc?: { id: string; depth: number; text: string }[]
  • removed: property IContentDocumentBase.updatedAt: Date | string
  • removed: type File = { path: string; extension: string; data: any }
  • removed: type contentFileBeforeInstert = (document: IContentDocument, database: Database) => void
  • removed: type contentFileBeforeParse = (file: File) => void
  • removed: type contentFunc = (...args: Array<string | Object>) => QueryBuilder
  • removed: type extendOrOverwrite<T> = ((old: T) => T) | T
  • removed: class Database
  • removed: constructor Database(options: DatabaseOptions)
  • removed: method Database.close(): Promise<void>
  • removed: method Database.init(): Promise<void>
  • removed: method Database.insertFile(path: string): Promise<void>
  • removed: method Database.normalizePath(path: string): string
  • removed: method Database.parseFile(path: string): Promise<IContentDocument>
  • removed: method Database.query(path: string, { deep, text }?: QueryBuilderOptions): QueryBuilder
  • removed: method Database.refresh(event: any, path: any): Promise<void>
  • removed: method Database.removeFile(path: string): Promise<void>
  • removed: method Database.updateFile(path: string): Promise<void>
  • removed: method Database.walk(dir: string): Promise<void>
  • removed: method Database.watch(): void
  • removed: property Database.csv: ICSV
  • removed: property Database.cwd: string
  • removed: property Database.db: Loki
  • removed: property Database.dir: string
  • removed: property Database.dirs: string[]
  • removed: property Database.extendParser: Record<string, Parser>
  • removed: property Database.extendParserExtensions: string[]
  • removed: property Database.items: Collection<object, object, object>
  • removed: property Database.markdown: IMarkdown
  • removed: property Database.options: DatabaseOptions
  • removed: property Database.queue: Queue<DefaultAddOptions, PriorityQueue>
  • removed: property Database.watcher: FSWatcher
  • removed: property Database.xml: IXML
  • removed: property Database.yaml: IYAML
  • removed: type AstReturns = Record<string, unknown>
  • removed: type AstUtility = { h: H, node: Node, u: typeof unistBuilder }
  • removed: type Highlighter = (rawCode: string, lang: string, thematicBlock?: ThematicBlock, astUtility?: AstUtility) => string | AstReturns
  • removed: type PromisedHighlighter = () => Promise<Highlighter>
  • removed: type ThematicBlock = { lineHighlights: string, fileName: string }
  • removed: const $content: contentFunc
  • removed: const Database: Database_imp
  • removed: const getOptions: (userOptions: IContentOptions) => IContentOptions
  • removed: declare module '@nuxt/types'
  • removed: declare module '@nuxt/types/config/hooks'
  • removed: declare module '@nuxt/vue-app'
  • removed: declare module 'vue/types/vue'
  • removed: declare module 'vuex/types/index'
  • removed: abstract class baseParser<Options>
  • removed: abstract method baseParser.toJSON(file: string): any
  • removed: constructor baseParser(options?: Options)
  • removed: property baseParser.options: Options
  • removed: class ICSV extends baseParser<CSVOptions>
  • removed: method ICSV.toJSON(file: string): any
  • removed: export { ICSV }
  • removed: export { IMarkdown }
  • removed: export { IXML }
  • removed: export { IYAML }
  • removed: class IMarkdown extends baseParser<MarkdownOptions>
  • removed: interface MarkdownOptions
  • removed: method IMarkdown.flattenNodeText(node: any): any
  • removed: method IMarkdown.generateBody(content: string): object
  • removed: method IMarkdown.generateToc(body: object): any[]
  • removed: method IMarkdown.processPluginsFor(type: any, stream: any): any
  • removed: method IMarkdown.toJSON(file: string): any
  • removed: property MarkdownOptions.basePlugins: () => string[] | string[]
  • removed: property MarkdownOptions.plugins: () => string[] | string[]
  • removed: property MarkdownOptions.prism: { theme: string | boolean }
  • removed: property MarkdownOptions.rehypePlugins: () => string[] | string[]
  • removed: property MarkdownOptions.remarkExternalLinks: () => string[] | string[]
  • removed: property MarkdownOptions.remarkPlugins: () => string[] | string[]
  • removed: class IXML extends baseParser<XMLOptions>
  • removed: method IXML.toJSON(file: string): any
  • removed: class IYAML extends baseParser<YamlOptions>
  • removed: method IYAML.toJSON(file: string): any
  • removed: class QueryBuilder
  • removed: constructor QueryBuilder({ query, path, init, text, postprocess }: QueryBuilderOptions, options: any)
  • removed: interface FetchReturn extends IContentDocumentBase
  • removed: method QueryBuilder.fetch(): Promise<FetchReturn | FetchReturn[]>
  • removed: method QueryBuilder.fetch<T>(): Promise<(T & FetchReturn) | (T & FetchReturn)[]>
  • removed: method QueryBuilder.limit(n: number | string): QueryBuilder
  • removed: method QueryBuilder.only(keys: string[] | string): QueryBuilder
  • removed: method QueryBuilder.search(query: any | string, value?: string): QueryBuilder
  • removed: method QueryBuilder.skip(n: number | string): QueryBuilder
  • removed: method QueryBuilder.sortBy(field: string, direction?: 'asc' | 'desc'): QueryBuilder
  • removed: method QueryBuilder.surround(slugOrPath: string, { before, after }?: any): QueryBuilder
  • removed: method QueryBuilder.where(query: object): QueryBuilder
  • removed: method QueryBuilder.without(keys: string[] | string): QueryBuilder
  • removed: property FetchReturn.createdAt: string
  • removed: property FetchReturn.updatedAt: string
  • removed: property QueryBuilder.init: any
  • removed: property QueryBuilder.limitN: number
  • removed: property QueryBuilder.onlyKeys: any[]
  • removed: property QueryBuilder.options: any
  • removed: property QueryBuilder.path: string
  • removed: property QueryBuilder.postprocess: any[]
  • removed: property QueryBuilder.query: any
  • removed: property QueryBuilder.skipN: number
  • removed: property QueryBuilder.sortKeys: any[]
  • removed: property QueryBuilder.withoutKeys: any