Running Hugo
Running the server
Start Hugo's development server, change ports and content flags, and keep the parsed log beside it.
Last updated
HugoKit runs hugo server for you, with the settings saved for each site and the command output laid out as a readable log.
Start and stop
Select the site and use Start Server in the toolbar; it becomes Stop Server while the server runs. The Server page has the same actions, plus Restart.
The exact command is written to the log before it runs, so you can always see what HugoKit asked Hugo to do:
– Starting hugo server…
hugo server --port 1313 --baseURL http://localhost:1313/ --buildDrafts
HugoKit always overrides --baseURL with http://localhost:<port>/ for the local preview. Your site’s real baseURL in hugo.toml is left alone – it’s what gets used when you publish.
Ports
The first site uses port 1313. Each later site uses the next port HugoKit can bind, allowing several servers to run at once.
If the port you’ve chosen is taken, the Server page says so before you start:
| Warning | What it means |
|---|---|
Port 1313 is also used by "my-site" | Another site in HugoKit has the same port. Change one of them. |
Port 1313 is already in use by another process | Something outside HugoKit holds the port – often a hugo server you started in a terminal. |
The warning does not block Start Server. If Hugo returns address already in use, HugoKit checks whether the existing process serves the same project and attaches to it when it does:
– Port 1313 is already in use – looking for existing server…
✓ Attached to Hugo server – port 1313, PID 4711
It only adopts a server whose project folder matches a site you’ve added. An unrelated Hugo server is left alone and noted in the log.
Drafts, future and expired content
Five toggles on the Server page cover the flags you’d otherwise have to remember:
| Setting | Flag it adds |
|---|---|
| Include drafts | --buildDrafts |
| Include future content | --buildFuture |
| Include expired content | --buildExpired |
| Disable fast render | --disableFastRender |
| Open browser on start | – |
Change any of them – or the port – while the server is running, and HugoKit restarts it for you.
Disable fast render is off by default, which is Hugo’s own default. Hugo’s fast render mode re-renders the page you are viewing rather than the whole site, which is why a page can keep showing output from before an edit – most often after a change to a shortcode, a partial or a list that other pages depend on. Turning it on rebuilds everything on every change: slower, and free of that particular surprise.
Draft counts elsewhere in the app come from hugo list drafts, so they match what Hugo itself thinks is a draft.
The log
Hugo’s output is parsed into timestamped events with a severity and summary. Errors and warnings retain their file references, such as layouts/index.html:14:3.
The log page has Copy, Export (saves it as a file) and Clear.
Deprecation notices are grouped on the site dashboard, with one entry per notice and a count of occurrences.
LiveReload
LiveReload is Hugo’s own, and HugoKit leaves it on – it never passes --disableLiveReload. If the browser isn’t reloading when you save, the log tells you which half is broken: see LiveReload isn’t reloading.
Clearing things
Two actions on the Server page, and they do different things:
- Clear Cache runs
hugo mod clean --all– Hugo’s own module cache. Nothing in your project is deleted. - Clean public/ deletes the
public/folder. HugoKit refuses to do it while the server is running, and says why: Hugo serves pages from disk, so the site would 404 until the next rebuild. Stop the server first.
Getting to your files
- Open in Browser – opens the running site. Available while the server runs.
- Reveal in Finder – shows the project folder in Finder.
- Open Public Folder (File menu) – opens
public/, the built site.