Public directory

public is a directory that contains files that are not processed.

Basically, all files that references your pages except raster image and svg.

Example

A PDF located in public/static/book.pdf would be referenced in a page as :

markdown
<a href="/static/book.pdf" download>Book</a>

Usage

It's use for files:

  • referenced in HTML/Markdown directly (<link rel="icon" href="/favicon.ico">)
  • whose paths must stay stable (e.g., referenced from a CMS, email template, or external service)
  • you don't want to be transformed

For example: