2021-10-11 12:57:54 +00:00
---
2022-10-06 09:15:30 +00:00
title: "public"
description: "The public/ directory is used to serve your website's static assets."
2022-11-21 15:51:39 +00:00
head.title: "public/"
2024-09-17 15:33:49 +00:00
navigation.icon: i-ph-folder
2021-10-11 12:57:54 +00:00
---
2023-11-16 14:23:59 +00:00
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` ).
2021-10-11 12:57:54 +00:00
2023-10-18 10:59:43 +00:00
```bash [Directory structure]
-| public/
---| favicon.ico
---| og-image.png
---| robots.txt
```
2021-10-13 08:54:57 +00:00
2023-10-18 10:59:43 +00:00
```vue [app.vue]
2024-02-13 12:50:38 +00:00
< script setup lang = "ts" >
2023-10-18 10:59:43 +00:00
useSeoMeta({
ogImage: '/og-image.png'
})
< / script >
```
2024-02-21 17:09:45 +00:00
::tip{to="https://v2.nuxt.com/docs/directory-structure/static" target="_blank"}
2023-10-18 10:59:43 +00:00
This is known as the [`static/`] directory in Nuxt 2.
2021-10-13 08:54:57 +00:00
::