public

public/ 目录用于提供网站的静态资源。

public/ 目录中包含的文件在根目录中提供,并且不会被构建过程修改。这适用于必须保留其名称(例如 robots.txt)或可能不会更改(例如 favicon.ico)的文件。

¥Files contained within the public/ directory are served at the root and are not modified by the build process. This is suitable for files that have to keep their names (e.g. robots.txt) or likely won't change (e.g. favicon.ico).

Directory structure
-| public/
---| favicon.ico
---| og-image.png
---| robots.txt
app.vue
<script setup lang="ts">
useSeoMeta({
  ogImage: '/og-image.png'
})
</script>
在 Nuxt 2 中,这被称为 static/ 目录。¥This is known as the static/ directory in Nuxt 2.