1.7 KiB
title | description | lead | date | lastmod | draft | images | menu | weight | toc | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commands | Doks comes with commands for common tasks. | Doks comes with commands for common tasks. | 2020-10-13T15:21:01+02:00 | 2020-10-13T15:21:01+02:00 | false |
|
130 | true |
{{< alert icon="💡" text="You can change the commands in the scripts section of ./package.json
." />}}
create
Create new content for your site:
{{< btn-copy text="npm run create" >}}
npm run create [path] [flags]
See also the Hugo docs: hugo new.
lint
Check scripts, styles, and markdown for errors:
{{< btn-copy text="npm run lint" >}}
npm run lint
scripts
Check scripts for errors:
{{< btn-copy text="npm run lint:scripts" >}}
npm run lint:scripts [-- --fix]
styles
Check styles for errors:
{{< btn-copy text="npm run lint:styles" >}}
npm run lint:styles [-- --fix]
markdown
Check markdown for errors:
{{< btn-copy text="npm run lint:markdown" >}}
npm run lint:markdown [-- --fix]
clean
Delete temporary directories:
{{< btn-copy text="npm run clean" >}}
npm run clean
start
Start local development server:
{{< btn-copy text="npm run start" >}}
npm run start
build
Build production website:
{{< btn-copy text="npm run build" >}}
npm run build
functions
Build Lambda functions:
{{< btn-copy text="npm run build:functions" >}}
npm run build:functions
preview
Build production website including draft and future content:
{{< btn-copy text="npm run build:preview" >}}
npm run build:preview