Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Hugo server command, always add server address at end of output for convenience #12359

Closed
frjo opened this issue Apr 11, 2024 · 3 comments · Fixed by #12367
Closed

For Hugo server command, always add server address at end of output for convenience #12359

frjo opened this issue Apr 11, 2024 · 3 comments · Fixed by #12367

Comments

@frjo
Copy link

frjo commented Apr 11, 2024

When you start the Hugo server you see this output in the terminal:

Environment: "development"
Serving pages from disk
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) 
Press Ctrl+C to stop

Command clicking http://localhost:1313/ (on macOS) open the address in a new browser tab.

You then work on the site and the terminal will show a lot of output. The server address is soon not visible anymore (unless you scroll of course).

I commonly work on multiple sites and keep the servers running for days, if not weeks.

I also work a lot with Django and its server adds the server address after each output. This way you always have quick access to it at the bottom of the terminal window. I find this very convenient.

Would it be possible to add this feature to Hugo as well?

@bep
Copy link
Member

bep commented Apr 11, 2024

I guess this makes sense. I suggest we add it before the "Total in ..." so it becomes:

Change detected, rebuilding site (#1).
2024-04-11 09:12:35.997 +0200
Source changed /documentation.md
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Total in 30 ms

@jmooring
Copy link
Member

Do we do the same thing with a multihost site?

[languages.en]
baseURL = 'https://en.example.org/'
weight = 1

[languages.de]
baseURL = 'https://de.example.org/'
weight = 2

[languages.fr]
baseURL = 'https://fr.example.org/'
weight = 3

[languages.es]
baseURL = 'https://es.example.org/'
weight = 4
Change detected, rebuilding site (#1).
2024-04-11 09:12:35.997 +0200
Source changed /documentation.md
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) en
Web Server is available at http://localhost:1314/ (bind address 127.0.0.1) de
Web Server is available at http://localhost:1315/ (bind address 127.0.0.1) fr
Web Server is available at http://localhost:1316/ (bind address 127.0.0.1) es
Total in 30 ms

jmooring added a commit to jmooring/hugo that referenced this issue Apr 13, 2024
jmooring added a commit to jmooring/hugo that referenced this issue Apr 13, 2024
jmooring added a commit to jmooring/hugo that referenced this issue Apr 13, 2024
@bep bep closed this as completed in 09eb822 Apr 13, 2024
Copy link

github-actions bot commented May 5, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants