Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ NUXT_FONTS_PATH=
NUXT_HINTS_PATH=
# Path to a local clone of github.com/nuxt/eslint (docs hosted under /modules/eslint)
NUXT_ESLINT_PATH=
# Path to a local clone of github.com/nuxt/image (docs hosted under /modules/image)
NUXT_IMAGE_PATH=

# ----------------------------------------------------------------------------
# Content revalidation webhook (optional — only needed to test the GitHub
Expand Down
10 changes: 8 additions & 2 deletions app/pages/modules/[slug]/[...path].vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const breadcrumb = computed(() => {
const trail = isDocsPage.value
? findBreadcrumb(docsNavigation.value, pagePath.value).map((item, index, all) => ({
label: item.title,
to: index < all.length - 1 ? item.path : undefined
to: item.page && index < all.length - 1 ? item.path : undefined
}))
: []

Expand Down Expand Up @@ -363,7 +363,13 @@ if (import.meta.server) {
</template>

<!-- Docs pages: the title sits under the breadcrumb on mobile, as on `/docs`. -->
<UPageHeader v-if="isDocsPage" :title="docsFm.title" :description="docsFm.description">
<UPageHeader
v-if="isDocsPage"
:title="docsFm.title"
:description="docsFm.description"
:links="docsFm.links"
:ui="{ wrapper: 'flex-row items-center flex-wrap justify-between' }"
>
<template #headline>
<UBreadcrumb :items="breadcrumb.full" class="hidden xl:block" />
<UBreadcrumb :items="breadcrumb.compact" class="xl:hidden" />
Expand Down
3 changes: 2 additions & 1 deletion shared/utils/module-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const MODULE_DOCS = {
devtools: { title: 'Nuxt DevTools', repo: 'nuxt/devtools', branch: 'main', contentDir: 'docs', envOverride: 'NUXT_DEVTOOLS_PATH' },
fonts: { title: 'Nuxt Fonts', repo: 'nuxt/fonts', branch: 'main', contentDir: 'docs', envOverride: 'NUXT_FONTS_PATH' },
hints: { title: 'Nuxt Hints', repo: 'nuxt/hints', branch: 'main', contentDir: 'docs', envOverride: 'NUXT_HINTS_PATH' },
eslint: { title: 'Nuxt ESLint', repo: 'nuxt/eslint', branch: 'main', contentDir: 'docs', envOverride: 'NUXT_ESLINT_PATH' }
eslint: { title: 'Nuxt ESLint', repo: 'nuxt/eslint', branch: 'main', contentDir: 'docs', envOverride: 'NUXT_ESLINT_PATH' },
image: { title: 'Nuxt Image', repo: 'nuxt/image', branch: 'main', contentDir: 'docs', envOverride: 'NUXT_IMAGE_PATH' }
} as const satisfies Record<string, {
/** Names the docs where the registry data is not at hand: `/llms.txt` sections. */
title: string
Expand Down
2 changes: 1 addition & 1 deletion shared/utils/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { MODULE_DOCS, MODULE_DOCS_NAMES, moduleDocsPathPrefix, type ModuleDocsNa
* Repos in the `nuxt` org a content instance reads from; the PR's base branch picks which instances.
* Module docs repos are listed here too (`icon` → `nuxt/icon`), so they must live in the `nuxt` org.
*/
export const PULL_REPOS = ['nuxt', 'cli', 'examples', 'nuxt.com', 'icon', 'devtools', 'fonts', 'hints', 'eslint'] as const
export const PULL_REPOS = ['nuxt', 'cli', 'examples', 'nuxt.com', 'icon', 'devtools', 'fonts', 'hints', 'eslint', 'image'] as const

export type PullRepo = (typeof PULL_REPOS)[number]

Expand Down
3 changes: 3 additions & 0 deletions test/unit/pull-paths.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ describe('isPullContentPage', () => {
expect(isPullContentPage('/modules/eslint')).toBe(true)
expect(isPullContentPage('/modules/eslint/config')).toBe(true)
expect(isPullContentPage('/modules/eslint-module')).toBe(false)
expect(isPullContentPage('/modules/image')).toBe(true)
expect(isPullContentPage('/modules/image/providers/cloudinary')).toBe(true)
expect(isPullContentPage('/modules/imagekit')).toBe(false)
expect(isPullContentPage('/blogs')).toBe(false)
})

Expand Down
Loading