Skip to content

Commit

Permalink
feat: add meta useContentHead
Browse files Browse the repository at this point in the history
  • Loading branch information
yanskun committed Oct 21, 2023
1 parent 57a25a5 commit 0b46f98
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ module.exports = {
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'vue'],
rules: {}
rules: {
'no-undef': 'off'
}
}
5 changes: 4 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ['@nuxt/content']
modules: ['@nuxt/content'],
content: {
documentDriven: true
}
})
5 changes: 0 additions & 5 deletions pages/[...slug].vue

This file was deleted.

10 changes: 10 additions & 0 deletions pages/[slug].vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<template>
<main>
<ContentDoc />
</main>
</template>

<script setup lang="ts">
const { page } = useContent()
useContentHead(page)
</script>

0 comments on commit 0b46f98

Please sign in to comment.