Skip to content

Commit

Permalink
chore: maybe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 20, 2025
1 parent 9e6381c commit e37fc43
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
13 changes: 4 additions & 9 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,21 @@ const links = useBreadcrumbItems()
<template>
<div class="flex flex-col min-h-screen">
<header class="sticky top-0 z-50 w-full backdrop-blur flex-none border-b border-gray-900/10 dark:border-gray-50/[0.06] bg-white/75 dark:bg-gray-900/75">
<UContainer class="py-3">
<div class="py-3">
<div class="flex items-end gap-1.5 font-bold text-xl text-gray-900 dark:text-white">
<Icon name="logos:nuxt-icon" class="w-8 h-8" />
Nuxt
<div class="text-primary-500 dark:text-primary-400">
SEO
</div>
</div>
</UContainer>
</div>
</header>
<main class="min-h-full h-full flex-grow">
<UContainer class="mt-4">
<div class="mt-4">
<UBreadcrumb :links="links" class="mb-5" />
<div>
<NuxtPage />
</div>
</UContainer>
</div>
</main>
<footer class="text-sm text-gray-700 flex justify-center items-center py-5">
Made by <UAvatar src="https://avatars.githubusercontent.com/u/5326365?v=4" size="xs" class="w-5 h-5 mx-1" /> Harlan Wilton
</footer>
</div>
</template>
1 change: 0 additions & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import NuxtSEO from '../src/module'
export default defineNuxtConfig({
modules: [
NuxtSEO,
'@nuxt/ui',
],

devtools: {
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/basic/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { resolve } from 'pathe'
import NuxtSEO from '../../../src/module'

export default defineNuxtConfig({
Expand All @@ -16,5 +17,8 @@ export default defineNuxtConfig({
sitemap: {
credits: false, // breaks snapshot
},

workspaceDir: resolve(__dirname, '../../..'),

compatibilityDate: '2024-08-07',
})
23 changes: 4 additions & 19 deletions test/fixtures/i18n/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ function setLanguage(code: string) {
i18n.setLocale(code)
}
const defaultLocale = i18n.defaultLocale
const items = useBreadcrumbItems({
path: `/${i18n.locale.value}/blog/my-post`,
prepend: [
Expand All @@ -33,12 +31,6 @@ const items = useBreadcrumbItems({
],
})
const languageOptions = [
[
{ label: 'English', click() { setLanguage('en') } },
{ label: 'French', click() { setLanguage('fr') } },
],
]
const route = useRoute()
if (route.query.name) {
updateSiteConfig({
Expand All @@ -52,10 +44,9 @@ const siteConfig = useSiteConfig()
<template>
<div class="flex flex-col min-h-screen">
<header class="sticky top-0 z-50 w-full backdrop-blur flex-none border-b border-gray-900/10 dark:border-gray-50/[0.06] bg-white/75 dark:bg-gray-900/75">
<UContainer class="py-3">
<div class="py-3">
<div class="flex items-center justify-between">
<NuxtLink to="/" class="flex items-center gap-1.5 font-bold text-xl text-gray-900 dark:text-white">
<Icon name="logos:nuxt-icon" class="w-8 h-8" />
Nuxt
<div class="text-primary-500 dark:text-primary-400">
{{ siteConfig.name }}
Expand All @@ -64,22 +55,16 @@ const siteConfig = useSiteConfig()
{{ siteConfig.url }}
</div>
</NuxtLink>
<UDropdown :items="languageOptions" :popper="{ placement: 'bottom-start' }">
<UButton color="white" :label="defaultLocale" trailing-icon="i-heroicons-chevron-down" />
</UDropdown>
</div>
</UContainer>
</div>
</header>
<main class="min-h-full h-full flex-grow">
<UContainer class="mt-4">
<div class="mt-4">
<div>
<UBreadcrumb :links="items" />
</div>
<NuxtPage />
</UContainer>
</div>
</main>
<footer class="text-sm text-gray-700 flex justify-center items-center py-5">
Made by <UAvatar src="https://avatars.githubusercontent.com/u/5326365?v=4" size="xs" class="w-5 h-5 mx-1" /> Harlan Wilton
</footer>
</div>
</template>
4 changes: 3 additions & 1 deletion test/fixtures/i18n/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import NuxtSEO from '../../../src/module'
import {resolve} from "pathe";

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
modules: [
NuxtSEO,
'@nuxtjs/i18n',
'@nuxt/ui',
],

nitro: {
Expand All @@ -15,6 +15,8 @@ export default defineNuxtConfig({
},
},

workspaceDir: resolve(__dirname, '../../..'),

i18n: {
baseUrl: 'https://nuxtseo.com',
defaultLocale: 'en',
Expand Down

0 comments on commit e37fc43

Please sign in to comment.