@happydesigns/ui 0.17.4 → 0.17.5
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/app/layouts/content.vue +4 -2
- package/app/layouts/page.vue +2 -2
- package/package.json +1 -1
package/app/layouts/content.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts" generic="C extends
|
|
2
|
-
import type { Collections } from '@nuxt/content'
|
|
1
|
+
<script setup lang="ts" generic="C extends keyof PageCollections = 'page'">
|
|
2
|
+
import type { Collections, PageCollections } from '@nuxt/content'
|
|
3
3
|
|
|
4
4
|
const {
|
|
5
5
|
path,
|
|
@@ -42,7 +42,9 @@ if (!page.value) {
|
|
|
42
42
|
|
|
43
43
|
usePageSeo(page)
|
|
44
44
|
|
|
45
|
+
const tocEnabled = computed(() => !page.value || !('toc' in page.value) || page.value.toc !== false)
|
|
45
46
|
const renderToc = computed(() => hasToc.value
|
|
47
|
+
&& tocEnabled.value
|
|
46
48
|
&& Boolean(page.value?.body?.toc?.links?.length))
|
|
47
49
|
const header = computed(() => resolvePageHeader(page.value))
|
|
48
50
|
</script>
|
package/app/layouts/page.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts" generic="C extends
|
|
2
|
-
import type { Collections } from '@nuxt/content'
|
|
1
|
+
<script setup lang="ts" generic="C extends keyof PageCollections = 'page'">
|
|
2
|
+
import type { Collections, PageCollections } from '@nuxt/content'
|
|
3
3
|
|
|
4
4
|
const {
|
|
5
5
|
path,
|
package/package.json
CHANGED