@wordup-md/nuxt-layer-shadcn-unocss 0.2.28 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.playground/app.config.ts +3 -0
  2. package/.playground/content/fr/index.md +31 -0
  3. package/.playground/nuxt.config.ts +12 -0
  4. package/components/content/Badge.vue +2 -2
  5. package/components/content/ButtonLink.vue +2 -2
  6. package/components/content/Card.vue +2 -2
  7. package/components/content/Hero.vue +4 -4
  8. package/components/content/HeroAlt.vue +4 -4
  9. package/components/content/MenuItem.vue +2 -2
  10. package/components/content/ProseA.vue +2 -2
  11. package/components/content/ProseH1.vue +2 -2
  12. package/components/content/ProseH2.vue +2 -2
  13. package/components/content/ProseH3.vue +2 -2
  14. package/components/content/ProseH4.vue +2 -2
  15. package/components/content/ProseH5.vue +2 -2
  16. package/components/content/ProseH6.vue +2 -2
  17. package/components/content/TeamCard.vue +2 -2
  18. package/components/layout/AsideMenuItem.vue +2 -2
  19. package/components/layout/AsideTree2.vue +2 -2
  20. package/components/layout/AsideTreeItem.vue +2 -2
  21. package/components/layout/Banner.vue +2 -2
  22. package/components/layout/Breadcrumb.vue +2 -2
  23. package/components/layout/EditLink.vue +2 -2
  24. package/components/layout/Footer.vue +2 -2
  25. package/components/layout/FooterItem.vue +2 -2
  26. package/components/layout/FooterSubmenuItem.vue +2 -2
  27. package/components/layout/Header/Logo.vue +2 -2
  28. package/components/layout/Header/MenuItem.vue +2 -2
  29. package/components/layout/Header/Nav.vue +4 -4
  30. package/components/layout/Header/NavMobileItem.vue +4 -4
  31. package/components/layout/Header/SubmenuItem.vue +2 -2
  32. package/components/layout/Header.vue +2 -2
  33. package/components/layout/PrevNextButton.vue +2 -2
  34. package/components/layout/Title.vue +4 -4
  35. package/components/layout/Toc.vue +1 -2
  36. package/components/layout/TocTree.vue +2 -2
  37. package/package.json +14 -20
  38. package/pages/index.vue +2 -1
  39. package/.playground/content/_menu-aside.md +0 -6
  40. /package/components/{layout/LangSwitcher.vue → LangSwitcher.vue} +0 -0
@@ -32,6 +32,9 @@ export default defineAppConfig({
32
32
  dark: '/logo-dark.svg',
33
33
  },
34
34
  border: true,
35
+ languageSwitcher: {
36
+ enable: true,
37
+ },
35
38
  darkModeToggle: true,
36
39
  nav: [{
37
40
  title: 'Docs',
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Accueil
3
+ description: Effortless and Beautiful Template.
4
+ layout: editorial
5
+ navigation: false
6
+ ---
7
+
8
+ ::hero
9
+ ---
10
+ actions:
11
+ - name: Démarrez
12
+ to: /fr/getting-started/introduction
13
+ - name: GitHub
14
+ variant: outline
15
+ to: https://github.com/wordup-md/nuxt-layer-shadcn-unocss
16
+ leftIcon: lucide:github
17
+ announcement:
18
+ title: Version 0.8.13
19
+ icon: 🎉
20
+ to: https://github.com/wordup-md/nuxt-layer-shadcn-unocss/releases/latest
21
+ target: _blank
22
+ class: full-width full-content
23
+ ---
24
+ #title
25
+ Accueil
26
+
27
+ #description
28
+ Construisez votre documentation, blog, boutique ou tout autre chose avec facilité. :br
29
+
30
+ Template Nuxt Content construit avec [shadcn-vue](https://www.shadcn-vue.com) et [unocss](https://unocss.dev).
31
+ ::
@@ -44,6 +44,18 @@ export default defineNuxtConfig({
44
44
 
45
45
  i18n: {
46
46
  defaultLocale: 'en',
47
+ locales: [
48
+ {
49
+ code: 'en',
50
+ name: 'English',
51
+ language: 'en-US',
52
+ },
53
+ {
54
+ code: 'fr',
55
+ name: 'Français',
56
+ language: 'fr-FR',
57
+ },
58
+ ],
47
59
  },
48
60
 
49
61
  unocss: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <NuxtLink
2
+ <NuxtLinkLocale
3
3
  v-if="to"
4
4
  :to
5
5
  :target
@@ -21,7 +21,7 @@
21
21
  </span>
22
22
  <ContentSlot unwrap="p" />
23
23
  </UiBadge>
24
- </NuxtLink>
24
+ </NuxtLinkLocale>
25
25
 
26
26
  <span
27
27
  v-else
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <NuxtLink
2
+ <NuxtLinkLocale
3
3
  :to="to || href"
4
4
  :target="(blank && '_blank') || target"
5
5
  class="button-link block"
@@ -26,7 +26,7 @@
26
26
  class="ml-2"
27
27
  />
28
28
  </UiButton>
29
- </NuxtLink>
29
+ </NuxtLinkLocale>
30
30
  </template>
31
31
 
32
32
  <script setup lang="ts">
@@ -136,14 +136,14 @@
136
136
  <div
137
137
  :class="cn('group/card group-has-[div]:mt-0 [&:not(:first-child)]:mt-5', String($attrs.class || ''))"
138
138
  >
139
- <NuxtLink
139
+ <NuxtLinkLocale
140
140
  v-if="to"
141
141
  :to
142
142
  :target
143
143
  style="text-decoration: none; font-weight: 500"
144
144
  >
145
145
  <CardInner />
146
- </NuxtLink>
146
+ </NuxtLinkLocale>
147
147
 
148
148
  <CardInner v-else />
149
149
  </div>
@@ -30,7 +30,7 @@
30
30
  </div>
31
31
 
32
32
  <div class="hero__content flex flex-col gap-6 w-full z-1 of-hidden">
33
- <NuxtLink
33
+ <NuxtLinkLocale
34
34
  v-if="announcement"
35
35
  :to="announcement.to"
36
36
  :target="announcement.target"
@@ -55,7 +55,7 @@
55
55
  name="lucide:arrow-right"
56
56
  class="ml-1 size-4"
57
57
  />
58
- </NuxtLink>
58
+ </NuxtLinkLocale>
59
59
 
60
60
  <h1 class="hero__title text-center text-3xl font-bold md:text-6xl md:leading-[1.25]">
61
61
  <ContentSlot
@@ -78,7 +78,7 @@
78
78
  v-if="actions"
79
79
  class="hero__actions flex w-full items-center justify-center space-x-4 py-4 md:pb-10"
80
80
  >
81
- <NuxtLink
81
+ <NuxtLinkLocale
82
82
  v-for="(action, i) in actions"
83
83
  :key="i"
84
84
  :to="action.to"
@@ -100,7 +100,7 @@
100
100
  class="ml-1"
101
101
  />
102
102
  </UiButton>
103
- </NuxtLink>
103
+ </NuxtLinkLocale>
104
104
  </section>
105
105
 
106
106
  <div
@@ -7,7 +7,7 @@
7
7
  class="flex flex-col items-start gap-2"
8
8
  :class="{ 'md:col-span-2': $slots.right }"
9
9
  >
10
- <NuxtLink
10
+ <NuxtLinkLocale
11
11
  v-if="announcement"
12
12
  :to="announcement.to"
13
13
  :target="announcement.target"
@@ -30,7 +30,7 @@
30
30
  name="lucide:arrow-right"
31
31
  class="ml-1 size-4"
32
32
  />
33
- </NuxtLink>
33
+ </NuxtLinkLocale>
34
34
 
35
35
  <h1
36
36
  class="text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]"
@@ -48,7 +48,7 @@
48
48
  </p>
49
49
 
50
50
  <div class="flex w-full items-center justify-start gap-2 py-2">
51
- <NuxtLink
51
+ <NuxtLinkLocale
52
52
  v-for="(action, i) in actions"
53
53
  :key="i"
54
54
  :to="action.to"
@@ -70,7 +70,7 @@
70
70
  class="ml-1"
71
71
  />
72
72
  </UiButton>
73
- </NuxtLink>
73
+ </NuxtLinkLocale>
74
74
  </div>
75
75
  </section>
76
76
  <div
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <NuxtLink
2
+ <NuxtLinkLocale
3
3
  :to="link._path"
4
4
  class="flex items-center gap-2 rounded-md p-2 text-sm text-foreground/80 hover:bg-muted hover:text-primary"
5
5
  :class="[
@@ -8,7 +8,7 @@
8
8
  ]"
9
9
  >
10
10
  <LayoutAsideTreeItemButton :link />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  </template>
13
13
 
14
14
  <script setup lang="ts">
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <NuxtLink
2
+ <NuxtLinkLocale
3
3
  :to="href"
4
4
  :target="target"
5
5
  :external="external"
6
6
  :class="cn('font-semibold underline underline-offset-4', String($attrs.class || ''))"
7
7
  >
8
8
  <slot />
9
- </NuxtLink>
9
+ </NuxtLinkLocale>
10
10
  </template>
11
11
 
12
12
  <script setup lang="ts">
@@ -3,12 +3,12 @@
3
3
  :id
4
4
  class="prose-h1 scroll-m-20 text-4xl font-extrabold tracking-tight text-pretty lg:text-5xl"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  v-if="generate"
8
8
  :to="`#${id}`"
9
9
  >
10
10
  <slot />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  <slot v-else />
13
13
  </h1>
14
14
  </template>
@@ -3,12 +3,12 @@
3
3
  :id
4
4
  class="prose-h2 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors [&:not(:first-child)]:mt-10"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  v-if="id && generate"
8
8
  :to="`#${id}`"
9
9
  >
10
10
  <slot />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  <slot v-else />
13
13
  </h2>
14
14
  </template>
@@ -3,12 +3,12 @@
3
3
  :id
4
4
  class="prose-h3 scroll-m-20 text-2xl font-semibold tracking-tight [&:not(:first-child)]:mt-8"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  v-if="id && generate"
8
8
  :to="`#${id}`"
9
9
  >
10
10
  <slot />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  <slot v-else />
13
13
  </h3>
14
14
  </template>
@@ -3,12 +3,12 @@
3
3
  :id
4
4
  class="prose-h4 scroll-m-20 text-xl font-semibold tracking-tight [&:not(:first-child)]:mt-6"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  v-if="id && generate"
8
8
  :to="`#${id}`"
9
9
  >
10
10
  <slot />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  <slot v-else />
13
13
  </h4>
14
14
  </template>
@@ -3,12 +3,12 @@
3
3
  :id
4
4
  class="prose-h5 scroll-m-20 text-lg font-semibold tracking-tight [&:not(:first-child)]:mt-6"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  v-if="id && generate"
8
8
  :to="`#${id}`"
9
9
  >
10
10
  <slot />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  <slot v-else />
13
13
  </h5>
14
14
  </template>
@@ -3,12 +3,12 @@
3
3
  :id
4
4
  class="prose-h6 scroll-m-20 text-lg font-semibold tracking-tight [&:not(:first-child)]:mt-6"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  v-if="id && generate"
8
8
  :to="`#${id}`"
9
9
  >
10
10
  <slot />
11
- </NuxtLink>
11
+ </NuxtLinkLocale>
12
12
  <slot v-else />
13
13
  </h6>
14
14
  </template>
@@ -23,14 +23,14 @@
23
23
  class="flex gap-3 text-secondary-foreground"
24
24
  :class="{ 'mx-auto': center }"
25
25
  >
26
- <NuxtLink
26
+ <NuxtLinkLocale
27
27
  v-for="link in links"
28
28
  :key="link.to"
29
29
  :to="link.to"
30
30
  :target="link.target"
31
31
  >
32
32
  <Icon :name="link.icon" />
33
- </NuxtLink>
33
+ </NuxtLinkLocale>
34
34
  </div>
35
35
  </div>
36
36
  </UiCardHeader>
@@ -72,7 +72,7 @@ const isOpen = ref(false)
72
72
  </template>
73
73
  </div>
74
74
 
75
- <NuxtLink
75
+ <NuxtLinkLocale
76
76
  v-else
77
77
  :to="redirect ?? _path ?? to"
78
78
  class="flex h-8 items-center gap-2 rounded-md p-2 text-sm text-foreground/80 hover:bg-muted hover:text-primary"
@@ -99,5 +99,5 @@ const isOpen = ref(false)
99
99
  {{ badge.value }}
100
100
  </Badge>
101
101
  </span>
102
- </NuxtLink>
102
+ </NuxtLinkLocale>
103
103
  </template>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <NuxtLink
2
+ <NuxtLinkLocale
3
3
  :to
4
4
  class="flex items-center gap-2 rounded-md p-2 text-sm text-foreground/80 hover:bg-muted hover:text-primary"
5
5
  >
@@ -10,7 +10,7 @@
10
10
  :size="16"
11
11
  />
12
12
  {{ title }}
13
- </NuxtLink>
13
+ </NuxtLinkLocale>
14
14
  </template>
15
15
 
16
16
  <script setup lang="ts">
@@ -43,7 +43,7 @@
43
43
  </template>
44
44
  </div>
45
45
  <!-- Page -->
46
- <NuxtLink
46
+ <NuxtLinkLocale
47
47
  v-else
48
48
  :to="link._path"
49
49
  class="flex items-center gap-2 rounded-md p-2 text-sm text-foreground/80 hover:bg-muted hover:text-primary"
@@ -53,7 +53,7 @@
53
53
  ]"
54
54
  >
55
55
  <LayoutAsideTreeItemButton :link />
56
- </NuxtLink>
56
+ </NuxtLinkLocale>
57
57
  </li>
58
58
  </template>
59
59
 
@@ -8,7 +8,7 @@
8
8
  'border-b': border,
9
9
  }"
10
10
  >
11
- <NuxtLink
11
+ <NuxtLinkLocale
12
12
  :to
13
13
  class="container flex items-stretch w-full md:px-8 h-full"
14
14
  @click.prevent.stop="navigate"
@@ -18,7 +18,7 @@
18
18
  :value="content"
19
19
  class="flex items-center justify-center text-primary text-lg w-full"
20
20
  />
21
- </NuxtLink>
21
+ </NuxtLinkLocale>
22
22
 
23
23
  <div class="absolute right-0 top-0 h-full">
24
24
  <div class="container h-full flex items-stretch justify-end">
@@ -6,7 +6,7 @@
6
6
  :key="breadcrumb.title"
7
7
  >
8
8
  <UiBreadcrumbItem>
9
- <NuxtLink
9
+ <NuxtLinkLocale
10
10
  :href="breadcrumb.href || '#'"
11
11
  class="transition-colors hover:text-foreground flex items-center gap-2"
12
12
  :class="index === breadcrumbs.length - 1 && 'text-foreground'"
@@ -23,7 +23,7 @@
23
23
  :name="breadcrumb.media"
24
24
  />
25
25
  {{ breadcrumb.title }}
26
- </NuxtLink>
26
+ </NuxtLinkLocale>
27
27
  </UiBreadcrumbItem>
28
28
 
29
29
  <UiBreadcrumbSeparator v-if="index !== breadcrumbs.length - 1" />
@@ -3,7 +3,7 @@
3
3
  v-if="enabledPageFooter"
4
4
  class="mb-6 w-fit"
5
5
  >
6
- <NuxtLink
6
+ <NuxtLinkLocale
7
7
  :to="url"
8
8
  target="_blank"
9
9
  class="text-sm font-semibold text-primary"
@@ -14,7 +14,7 @@
14
14
  {{ $t(text) }}
15
15
  </span>
16
16
  </div>
17
- </NuxtLink>
17
+ </NuxtLinkLocale>
18
18
  </div>
19
19
  </template>
20
20
 
@@ -13,7 +13,7 @@
13
13
  class="text-sm"
14
14
  />
15
15
  <span class="flex-1" />
16
- <NuxtLink
16
+ <NuxtLinkLocale
17
17
  v-for="(link, i) in footer.links"
18
18
  :key="i"
19
19
  :to="link?.to"
@@ -32,7 +32,7 @@
32
32
  />
33
33
  <span v-if="link?.title">{{ $t(link.title) }}</span>
34
34
  </UiButton>
35
- </NuxtLink>
35
+ </NuxtLinkLocale>
36
36
 
37
37
  <ButtonLogin v-if="footer.showLogin" />
38
38
  </div>
@@ -22,7 +22,7 @@ defineProps<{
22
22
  unwrap="p"
23
23
  />
24
24
  </div>
25
- <!-- <NuxtLink
25
+ <!-- <NuxtLinkLocale
26
26
  :to
27
27
  :target
28
28
  class="mb-1 flex w-full gap-2 rounded-md px-3 py-2 transition-all hover:bg-muted"
@@ -45,6 +45,6 @@ defineProps<{
45
45
  {{ description }}
46
46
  </div>
47
47
  </div>
48
- </NuxtLink> -->
48
+ </NuxtLinkLocale> -->
49
49
  </component>
50
50
  </template>
@@ -12,7 +12,7 @@ const { to, target, icon, title, description, tag } = defineProps<{
12
12
 
13
13
  <template>
14
14
  <component :is="tag || 'div'">
15
- <NuxtLink
15
+ <NuxtLinkLocale
16
16
  :to
17
17
  :target
18
18
  class="mb-1 flex w-full gap-1 group"
@@ -34,6 +34,6 @@ const { to, target, icon, title, description, tag } = defineProps<{
34
34
  {{ description }}
35
35
  </div>
36
36
  </div>
37
- </NuxtLink>
37
+ </NuxtLinkLocale>
38
38
  </component>
39
39
  </template>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <NuxtLink
3
+ <NuxtLinkLocale
4
4
  v-if="logo.light && logo.dark"
5
5
  to="/"
6
6
  class="logo__container flex transition"
@@ -21,7 +21,7 @@
21
21
  >
22
22
  {{ $t(title) }}
23
23
  </div>
24
- </NuxtLink>
24
+ </NuxtLinkLocale>
25
25
  </div>
26
26
  </template>
27
27
 
@@ -17,7 +17,7 @@ const { to, target, showLinkIcon, icon, title, tag, dropdownClass }
17
17
 
18
18
  <template>
19
19
  <UiNavigationMenuItem class="relative">
20
- <NuxtLink
20
+ <NuxtLinkLocale
21
21
  v-if="!$slots.content"
22
22
  :to
23
23
  :target
@@ -42,7 +42,7 @@ const { to, target, showLinkIcon, icon, title, tag, dropdownClass }
42
42
  <span v-if="title">{{ title }}</span>
43
43
  <slot v-else-if="$slots.default" />
44
44
  </div>
45
- </NuxtLink>
45
+ </NuxtLinkLocale>
46
46
 
47
47
  <template v-else>
48
48
  <UiNavigationMenuTrigger
@@ -19,7 +19,7 @@
19
19
  v-for="link in item.links"
20
20
  :key="link.title"
21
21
  >
22
- <NuxtLink
22
+ <NuxtLinkLocale
23
23
  :to="link.to"
24
24
  :target="link.target"
25
25
  class="mb-1 flex w-full gap-2 rounded-md px-3 py-2 transition-all hover:bg-muted"
@@ -39,12 +39,12 @@
39
39
  {{ $t(link.description) }}
40
40
  </div>
41
41
  </div>
42
- </NuxtLink>
42
+ </NuxtLinkLocale>
43
43
  </li>
44
44
  </ul>
45
45
  </UiNavigationMenuContent>
46
46
  </template>
47
- <NuxtLink
47
+ <NuxtLinkLocale
48
48
  v-else
49
49
  :to="item.to"
50
50
  :target="item.target"
@@ -64,7 +64,7 @@
64
64
  >
65
65
  {{ $t(item.title) }}
66
66
  </div>
67
- </NuxtLink>
67
+ </NuxtLinkLocale>
68
68
  </UiNavigationMenuItem>
69
69
  </UiNavigationMenuList>
70
70
  </UiNavigationMenu>
@@ -19,7 +19,7 @@
19
19
  v-for="link in item.links"
20
20
  :key="link.title"
21
21
  >
22
- <NuxtLink
22
+ <NuxtLinkLocale
23
23
  :to="link.to"
24
24
  :target="link.to"
25
25
  class="mb-1 flex w-full gap-2 rounded-md px-3 py-2 transition-all hover:bg-muted"
@@ -39,13 +39,13 @@
39
39
  {{ $t(link.description) }}
40
40
  </div>
41
41
  </div>
42
- </NuxtLink>
42
+ </NuxtLinkLocale>
43
43
  </li>
44
44
  </ul>
45
45
  </UiCollapsibleContent>
46
46
  </UiCollapsible>
47
47
  </template>
48
- <NuxtLink
48
+ <NuxtLinkLocale
49
49
  v-else
50
50
  :to="item.to"
51
51
  :target="item.target"
@@ -58,7 +58,7 @@
58
58
  class="ml-1 text-muted-foreground"
59
59
  size="12"
60
60
  />
61
- </NuxtLink>
61
+ </NuxtLinkLocale>
62
62
  </template>
63
63
 
64
64
  <script setup lang="ts">
@@ -12,7 +12,7 @@ const { to, target, icon, title, description, tag } = defineProps<{
12
12
 
13
13
  <template>
14
14
  <component :is="tag || 'div'">
15
- <NuxtLink
15
+ <NuxtLinkLocale
16
16
  :to
17
17
  :target
18
18
  class="mb-1 flex w-full gap-2 rounded-md px-3 py-2 transition-all hover:bg-muted"
@@ -34,6 +34,6 @@ const { to, target, icon, title, description, tag } = defineProps<{
34
34
  {{ description }}
35
35
  </div>
36
36
  </div>
37
- </NuxtLink>
37
+ </NuxtLinkLocale>
38
38
  </component>
39
39
  </template>
@@ -54,7 +54,7 @@
54
54
  <NuxtLinkLocale
55
55
  v-for="(link, i) in config.header.links"
56
56
  :key="i"
57
- :to="localePath(link?.to)"
57
+ :to="link?.to"
58
58
  :target="link?.target"
59
59
  >
60
60
  <UiButton
@@ -87,7 +87,7 @@ import { useWindowScroll } from '@vueuse/core'
87
87
  import { cn } from '@/lib/utils'
88
88
 
89
89
  const config = useConfig()
90
- const { i18nEnabled, localePath } = useI18nDocs()
90
+ const { i18nEnabled } = useI18nDocs()
91
91
 
92
92
  const { y } = useWindowScroll()
93
93
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <NuxtLink
2
+ <NuxtLinkLocale
3
3
  v-if="prevNext && prevNext._path"
4
4
  :to="prevNext._path"
5
5
  class="inline-block w-full mb-6 space-y-2 rounded-lg border p-4 transition-all hover:bg-muted/50"
@@ -37,7 +37,7 @@
37
37
  />
38
38
  </div>
39
39
  </div>
40
- </NuxtLink>
40
+ </NuxtLinkLocale>
41
41
  </template>
42
42
 
43
43
  <script setup lang="ts">
@@ -23,7 +23,7 @@
23
23
  :key="i"
24
24
  >
25
25
  <template v-if="badge.to">
26
- <NuxtLink
26
+ <NuxtLinkLocale
27
27
  :to="badge.to"
28
28
  :target="badge.target"
29
29
  >
@@ -38,7 +38,7 @@
38
38
  />
39
39
  {{ badge.value }}
40
40
  </UiBadge>
41
- </NuxtLink>
41
+ </NuxtLinkLocale>
42
42
  </template>
43
43
 
44
44
  <UiBadge
@@ -61,7 +61,7 @@
61
61
  v-if="authors"
62
62
  class="-mx-4 flex divide-x pt-4"
63
63
  >
64
- <NuxtLink
64
+ <NuxtLinkLocale
65
65
  v-for="author in authors"
66
66
  :key="author.name"
67
67
  :to="author.to"
@@ -88,7 +88,7 @@
88
88
  @{{ author.username }}
89
89
  </div>
90
90
  </div>
91
- </NuxtLink>
91
+ </NuxtLinkLocale>
92
92
  </div>
93
93
  </div>
94
94
  </template>
@@ -24,7 +24,7 @@
24
24
  <NuxtLinkLocale
25
25
  v-for="(link, i) in links"
26
26
  :key="i"
27
- :to="localePath(link.to)"
27
+ :to="link.to"
28
28
  :target="link.target"
29
29
  class="flex w-full gap-1 underline-offset-4 hover:underline [&:not(:first-child)]:pt-3"
30
30
  >
@@ -76,7 +76,6 @@
76
76
  defineProps<{ isSmall?: boolean }>()
77
77
 
78
78
  const { toc } = useContent()
79
- const { localePath } = useI18nDocs()
80
79
  const { title, links: configLinks } = useConfig().value.toc
81
80
  const { border } = useConfig().value.header
82
81
  const isOpen = ref(false)
@@ -11,7 +11,7 @@
11
11
  class="absolute md:ml-1.5 left-0 top-0 bottom-0 w-px transition-colors duration-300 ease-in-out"
12
12
  :class="isActive(link) ? 'bg-primary' : 'bg-border'"
13
13
  />
14
- <NuxtLink
14
+ <NuxtLinkLocale
15
15
  :to="`#${link.id}`"
16
16
  class="text-muted-foreground transition-all hover:text-primary"
17
17
  :class="{
@@ -20,7 +20,7 @@
20
20
  }"
21
21
  >
22
22
  {{ link.text }}
23
- </NuxtLink>
23
+ </NuxtLinkLocale>
24
24
  </div>
25
25
  <TocTree
26
26
  v-if="link.children"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wordup-md/nuxt-layer-shadcn-unocss",
3
3
  "type": "module",
4
- "version": "0.2.28",
4
+ "version": "0.3.0",
5
5
  "author": "Emmanuel Salomon <emmanuel.salomon@gmail.com>",
6
6
  "main": "./nuxt.config.ts",
7
7
  "repository": {
@@ -16,20 +16,6 @@
16
16
  "wordup-md"
17
17
  ],
18
18
  "license": "MIT",
19
- "scripts": {
20
- "dev": "nuxt dev .playground",
21
- "dev:unpress": "UNPRESS=true nuxt dev .playground",
22
- "dev:root": "nuxt dev",
23
- "prepare": "npx nuxt prepare .playground",
24
- "build": "npx nuxt build .playground",
25
- "generate": "npx nuxt generate .playground",
26
- "preview": "npx nuxt preview .playground",
27
- "lint": "eslint .",
28
- "build:json-doc": "tsx scripts/buildContentDoc-cli.ts",
29
- "bump": "pnpm build:json-doc && git add public/content-doc.json && bumpp --skip-install --commit --push --tag",
30
- "release": "pnpm bump && npm publish",
31
- "clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + && find . -name '.nuxt' -type d -prune -exec rm -rf '{}' + && find . -name '.output' -type d -prune -exec rm -rf '{}' + && find . -name 'dist' -prune -exec rm -rf '{}' +"
32
- },
33
19
  "devDependencies": {
34
20
  "@nuxt/eslint": "latest",
35
21
  "@nuxt/kit": "^3.17.2",
@@ -69,9 +55,17 @@
69
55
  "tailwind-merge": "^3.2.0"
70
56
  },
71
57
  "packageManager": "pnpm@10.4.1",
72
- "pnpm": {
73
- "onlyBuiltDependencies": [
74
- "sharp"
75
- ]
58
+ "scripts": {
59
+ "dev": "nuxt dev .playground",
60
+ "dev:unpress": "UNPRESS=true nuxt dev .playground",
61
+ "dev:root": "nuxt dev",
62
+ "build": "npx nuxt build .playground",
63
+ "generate": "npx nuxt generate .playground",
64
+ "preview": "npx nuxt preview .playground",
65
+ "lint": "eslint .",
66
+ "build:json-doc": "tsx scripts/buildContentDoc-cli.ts",
67
+ "bump": "pnpm build:json-doc && git add public/content-doc.json && bumpp --skip-install --commit --push --tag",
68
+ "release": "pnpm bump && npm publish",
69
+ "clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + && find . -name '.nuxt' -type d -prune -exec rm -rf '{}' + && find . -name '.output' -type d -prune -exec rm -rf '{}' + && find . -name 'dist' -prune -exec rm -rf '{}' +"
76
70
  }
77
- }
71
+ }
package/pages/index.vue CHANGED
@@ -1,6 +1,7 @@
1
1
  <template>
2
- <NuxtLayout :class="page.header?.position === 'over' && 'header-over'">
2
+ <NuxtLayout :class="page?.header?.position === 'over' && 'header-over'">
3
3
  <ContentCms
4
+ v-if="page"
4
5
  :key="page._id"
5
6
  :value="page"
6
7
  class="content-grid"
@@ -1,6 +0,0 @@
1
- # [](/getting-started)
2
-
3
- # [](/content-elements)
4
-
5
- # [](/components/)
6
-