Skip to content

Commit

Permalink
Update content.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
raselshikdar authored Oct 4, 2024
1 parent 3339ff2 commit 9cf8922
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions composables/content.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

import { packMeta, unpackMeta } from '@zhead/vue'
import { useAsyncData } from '#app'
import { SiteName, groupBy } from '~/logic'
import { nextTick, queryContent, unref, useHead, watch } from '#imports'
import type { JsonParsedContent, Page, Post, ProjectList } from '~/types'
import type { JsonParsedContent, Page, Post, ProjectList, NoteList } from '~/types'
import type { MaybeRef } from '@vueuse/schema-org'

export const useProjects = () => {
Expand All @@ -12,6 +11,12 @@ export const useProjects = () => {
)
}

export const useNotes = () => {
return useAsyncData('content:notes', () =>
queryContent<JsonParsedContent<NoteList>>('notes').findOne(),
)
}

export const useHeaderNav = () => {
return useAsyncData('content:navigation', () => queryContent('pages')
.where({ nav: true })
Expand Down

0 comments on commit 9cf8922

Please sign in to comment.