Pentru rulat Hugo in WSL (unde nu merge localhost:1313):

1
2
3
4
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
}

Dupa rulezi direct hugo_server. IP-ul il iei din consola:

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

Tyler Quinlivan - Working with Hugo on WSL