Internal Hugo Commands

Doks comes with commands for common tasks.


Create new content for your site:

npm run create [path] [flags]

See also the Hugo docs: hugo new.

Docs based tree

Create a docs based tree — with a single command:

npm run create -- --kind docs [section]

For example, create a docs based tree named guides:

npm run create -- --kind docs guides


Check scripts, styles, and markdown for errors:

npm run lint


Check scripts for errors:

npm run lint:scripts [-- --fix]


Check styles for errors:

npm run lint:styles [-- --fix]


Check markdown for errors:

npm run lint:markdown [-- --fix]


Delete temporary directories:

npm run clean


Start local development server:

npm run start


Build production website:

npm run build


Build Lambda functions:

npm run build:functions


Build production website including draft and future content:

npm run build:preview


  • Git — latest source release
  • Node.js — latest LTS version or newer

Start a new Doks project

Create a new site, change directories, install dependencies, and start development server.

Create a new site

Doks is available as a child theme and a starter theme.

Child theme

git clone my-doks-site

Starter theme

  • Intended for intermediate to advanced users
  • Intended for major customizations
git clone my-doks-site
Help me choose Not sure which one is for you? Pick the child theme.

Change directories

cd my-doks-site

Install dependencies

npm install

Start development server

npm run start

Doks will start the Hugo development webserver accessible by default at http://localhost:1313. Saved changes will live reload in the browser.

Other commands

Doks comes with commands for common tasks. Commands →

Problems updating npm packages

Delete the ./node_modules folder, and run again:

npm install

Problems with cache

Delete the temporary directories:

npm run clean

How to update

“Regularly update the installed npm packages to keep your Doks website stable, usable, and secure.”

Check for outdated packages

The npm outdated command will check the registry to see if any (or, specific) installed packages are currently outdated:

npm outdated [[<@scope>/]<pkg> ...]

Update packages

The npm update command will update all the packages listed to the latest version (specified by the tag config), respecting semver:

npm update [<pkg>...]