Post
How I Built My Custom Hugo Pagination
· Reading time: ~5 minute(s) (1011 words) post programming gohugo.ioI’ve been planning on improving the pagination control for my blog for some time, but it always seemed a bigger job than I really wanted to work on in my spare time, but I was wrong. The only complexity was around the weird templating syntax that I hadn’t really got to grips with fully yet.
So I did some research first, why re-invent the wheel right? And I came across a really good tutorial from Glenn McComb where he went through how he built his, and seeing his examples, along with his explanations, made the syntax sink in better. I’d recommend giving his page a read first, as mine is based upon his with a few changes.
(Continue reading)View Hugo served content on another device on network
· Reading time: ~1 minute(s) (190 words) post gohugo.io webWhen you want to view content served by a locally running instance of Hugo on another device, you have to specify a few extra things so it will work correctly.
When you start the Hugo server locally, it will show the following output:
$ hugo server -w
...
(some output omitted here for brevity)
...
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
Because it’s bound to your localhost IP, you can’t just open port 1313 on your computer via a firewall and access Hugo from another device. You have to bind Hugo to the network IP instead (To find out the IP, try ipconfig on Windows or ip a on Linux).