FerryDocs

Static sites

A static site is files only. nginx serves them on port 80.

Edit on GitHub
BrowserGET /aboutnginx:alpineport 80about.htmldocs/index.html404.html

A request for /about gets about.html.

1 / 3

A is files only. Ferry can build it first. Then (nginx:alpine) serves the files on port 80. Create it with --type static.

Plain HTML

index.html
about.html
404.html
Terminal
ferry up site --type static --follow

With no build step, Ferry serves the first of these:

  1. The (--publish-dir), if you set one.
  2. The root, when it has an index.html.
  3. The first of dist, build, out, public, _site and site that contains an index.html.

A site with a build step is on the next page.

What nginx does with the files

  • try_files $uri $uri/ $uri.html: /about gets about.html, and /docs/ gets docs/index.html.
  • An unknown path gets 404.html from the publish directory, if it has one.
  • gzip for text, CSS, JavaScript, JSON, XML and SVG.
  • nginx never serves dotfiles (.git, .env, .npmrc…). The exception is /.well-known/.

On this page