cec-nuxt-lib 0.5.5 → 0.6.1

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.
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "cec-nuxt-lib",
3
3
  "configKey": "cec-nuxt-lib",
4
- "version": "0.5.5"
4
+ "version": "0.6.1"
5
5
  }
@@ -14,9 +14,11 @@ const trimPath = (str) => {
14
14
  return str.replace(/\/$/, '');
15
15
  };
16
16
 
17
- const makeLink = (i, routes) => {
17
+ const makeLink = (i, routes, length) => {
18
18
  if (baseUrl !== '/') {
19
19
  return i ? routes.slice(0, i + 1).join('/') : '/';
20
+ } else {
21
+ return routes.slice(0, i + length).join('/');
20
22
  }
21
23
  };
22
24
 
@@ -68,7 +70,7 @@ const links = hrefs.map((e, i) => (!i ? 'Home' : toSentenceCase(e)));
68
70
  }}</span>
69
71
  <!-- Nuxt links -->
70
72
  <template v-else-if="i + 1 >= length">
71
- <NuxtLink :to="makeLink(i - length + 1, routes)"
73
+ <NuxtLink :to="makeLink(i - length + 1, routes, length)"
72
74
  >{{ l }}
73
75
  </NuxtLink>
74
76
  </template>
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { useState } from '#app';
2
+ import { useState, useHead, useSeoMeta } from '#app';
3
3
  const baseUrl = useState('baseUrl');
4
4
  const description = useState('description');
5
5
  const ogImage = useState('ogImage');
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.5.5",
2
+ "version": "0.6.1",
3
3
  "name": "cec-nuxt-lib",
4
4
  "description": "Nuxt components and assets",
5
5
  "license": "MIT",