Workflow

Learn how to edit, build, preview, and deploy your Doks project using popular package managers.

Edit your project

To make changes to your project, open your project folder in your code editor. Working in development mode with the development server running allows you to see updates to your site as you edit the code.

When working locally, Hugo’s development server lets you preview your work and automatically refreshes your browser when you make changes.

Inside your project directory, run the following command to start the development server:

This will log a message to your terminal with the URL of your local preview. Open this—clickable—URL to start browsing your site.

Watching for changes in D:\THULITE\getdoks.org\{archetypes,assets,content,i18n,layouts,node_modules,package.json,static}
Watching for config changes in D:\THULITE\getdoks.org\config\_default, D:\THULITE\getdoks.org\config\_default\menus
Start building sites …
hugo v0.148.2-40c3d8233d4b123eff74725e5766fc6272f0a84d+extended windows/amd64 BuildDate=2025-07-27T12:43:24Z VendorInfo=gohugoio


                  │ EN
──────────────────┼─────
 Pages            │ 121
 Paginator pages  │   3
 Non-page files   │  49
 Static files     │  17
 Processed images │ 480
 Aliases          │   6
 Cleaned          │   0

Built in 780 ms
Environment: "development"
Serving pages from disk
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Build your site

To check the version of your site that will be created at build time, quit the development server (Ctrl + C) and run the appropriate build command for your package manager in your terminal.

Hugo will build a deploy-ready version of your site in a separate folder (public/ by default) and you can watch its progress in the terminal. This will alert you to any build errors in your project before you deploy to production.

Start building sites …
hugo v0.148.2-40c3d8233d4b123eff74725e5766fc6272f0a84d+extended windows/amd64 BuildDate=2025-07-27T12:43:24Z VendorInfo=gohugoio


                  │ EN
──────────────────┼─────
 Pages            │ 121
 Paginator pages  │   3
 Non-page files   │  49
 Static files     │  17
 Processed images │ 480
 Aliases          │   6
 Cleaned          │   2

Total in 1456 ms

Preview your site

To preview the built version of your site locally, run the appropriate preview command for your package manager in your terminal.

Note that, this previews your code as it existed when the build command was last run. This is meant to give you a preview of how your site will look when it is deployed to the web. Any later changes you make to your code after building will not be reflected while you preview your site until you run the build command again.

Note

Preview the build on your local network—for example on your mobile phone—by using the --host flag:

$ vite preview --outDir public --host
  ➜  Local:   http://localhost:4173/
  ➜  Network: http://192.168.1.23:4173/
  ➜  Network: http://192.168.144.1:4173/
  ➜  press h + enter to show help

Deploy your site

You may wish to deploy your new site right away, before you begin to add or change too much code. This is helpful to get a minimal, working version of your site published and can save you extra time and effort troubleshooting your deployment later.