Skip to content

Commit

Permalink
feat: nuxt image
Browse files Browse the repository at this point in the history
  • Loading branch information
hannoeru committed Sep 1, 2024
1 parent ea86307 commit b3bb7f5
Show file tree
Hide file tree
Showing 4 changed files with 406 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/components/content/ProseImg.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<img
<NuxtImg
:src="src"
:alt="alt"
:width="width"
:height="height"
class="w-full my-2em rounded-lg md:rounded-xl"
loading="lazy"
>
/>
</template>

<script setup lang="ts">
Expand Down
4 changes: 2 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineNuxtConfig({
future: { compatibilityVersion: 4 },

// https://nuxt.com/modules
modules: ['@nuxtjs/color-mode', '@nuxt/content', '@unocss/nuxt', '@vueuse/nuxt', '@nuxthub/core', '@nuxt/eslint'],
modules: ['@nuxtjs/color-mode', '@nuxt/content', '@unocss/nuxt', '@vueuse/nuxt', '@nuxthub/core', '@nuxt/eslint', '@nuxt/image'],

// https://hub.nuxt.com/docs/getting-started/installation#options
hub: {},
Expand Down Expand Up @@ -132,4 +132,4 @@ export default defineNuxtConfig({
},
rules: [],
},
})
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@iconify/json": "^2.2.242",
"@nuxt/content": "^2.13.2",
"@nuxt/eslint": "^0.5.4",
"@nuxt/image": "^1.8.0",
"@nuxthub/core": "^0.7.8",
"@nuxtjs/color-mode": "^3.4.4",
"@unocss/nuxt": "^0.62.3",
Expand Down
Loading

0 comments on commit b3bb7f5

Please sign in to comment.