Skip to content

Instantly share code, notes, and snippets.

@tquin
Last active February 27, 2024 18:39
Show Gist options
  • Save tquin/98eaa40004df298a5ee5a26e8f5cb300 to your computer and use it in GitHub Desktop.
Save tquin/98eaa40004df298a5ee5a26e8f5cb300 to your computer and use it in GitHub Desktop.
function hugo_server() {
WSL2_IPADDRESS=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
hugo server --bind $WSL2_IPADDRESS --baseURL=http://$WSL2_IPADDRESS -D -F --gc -w
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment