mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 14:45:15 +00:00
f26a801775
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
28 lines
663 B
Markdown
28 lines
663 B
Markdown
---
|
|
title: "public"
|
|
description: "The public/ directory is used to serve your website's static assets."
|
|
head.title: "public/"
|
|
navigation.icon: i-ph-folder-duotone
|
|
---
|
|
|
|
The `public/` is served at the server root and contains public files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`).
|
|
|
|
```bash [Directory structure]
|
|
-| public/
|
|
---| favicon.ico
|
|
---| og-image.png
|
|
---| robots.txt
|
|
```
|
|
|
|
```vue [app.vue]
|
|
<script setup>
|
|
useSeoMeta({
|
|
ogImage: '/og-image.png'
|
|
})
|
|
</script>
|
|
```
|
|
|
|
::callout{to="https://v2.nuxt.com/docs/directory-structure/static" target="_blank"}
|
|
This is known as the [`static/`] directory in Nuxt 2.
|
|
::
|