Start the Hugo server with your local IP

I want to share my writings to my colleague thorugh my IP before publishing it. So here how I done it:

  • Get your IP using the command ipconfig from the terminal.
  • Go to your Hugo project’s root directory in your terminal.
  • Run the following command, replacing <YOUR_NETWORK_IP> with the IP address.
  • hugo server --bind 0.0.0.0 --baseUrl http://<YOUR_NETWORK_IP>:1313
  • The server will start, and the output should show the website is available at http://<YOUR_NETWORK_IP>:1313.

Read more...