Update asset-handling.md

pull/4910/head
Mehraz Morshed 1 month ago committed by GitHub
parent 7df3052512
commit b1f7c22d1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,13 +22,13 @@ All **static** path references, including absolute paths, should be based on you
## The Public Directory
Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components, or you may want to serve certain files with the original filename. Examples of such files include `robots.txt`, favicons, and PWA icons.
Sometimes you may need to provide static assets that are not directly referenced in your Markdown files or theme components, or you may want to serve certain files with the original filename. Examples of such files include `robots.txt`, favicons, and PWA icons.
You can place these files in the `public` directory under the [source directory](./routing#source-directory). For example, if your project root is `./docs` and using default source directory location, then your public directory will be `./docs/public`.
You can place these files in the `public` directory inside your [source directory](./routing#source-directory). For example, if your project root is `./docs` and youre using default source directory location, then your public directory will be `./docs/public`.
Assets placed in `public` will be copied to the root of the output directory as-is.
Note that you should reference files placed in `public` using root absolute path - for example, `public/icon.png` should always be referenced in source code as `/icon.png`.
Note that you should reference files placed in `public` using root absolute path. For example, `public/icon.png` should always be referenced in source code as `/icon.png`.
## Base URL

Loading…
Cancel
Save