FerryDocs
ContributingDocs site

Build and deploy

npm run build writes the static site to out/ and fails on a broken link.

Edit on GitHub

Export. The build writes out/: static HTML, the search index and the Open Graph images.

1 / 4

Build and preview

Terminal
npm run build     # → out/: static HTML, the search index, Open Graph images, then the link check
npm start         # preview out/

npm run build fails on each internal link or #anchor that does not resolve in the exported site. The check includes the links of the sidebar and of the table of contents.

Build variables

Three variables change the output. Set them before npm run build.

VariableDefaultUse
DOCS_SITE_URLhttp://localhost:3000The public URL of the site: the and the URLs
FERRY_DOCS_SERVER_URLhttp://127.0.0.1:7878The "Dashboard" link and the server URL in the API request examples. Set it for a public site: the default only works on the machine of the reader.
DOCS_GIT_BRANCHdevThe branch of the "Edit on GitHub" links. It must contain docs/.

Deploy

out/ is a plain static site. Copy it to a static host, or host the docs on Ferry itself.

On this page