Hugo - Quick run
How to quickly run hugo
So I’ve been putting off writing posts for a while, and I don’t really know why. I think it maybe that I just find it a hassle to get everything up and running to write a post, so I thought I would do something about that.
- Open file explorer in Windows
- Navigate to your hugo site directory
This is the location, e.g. c:/hugo/sites/example.com, that we set up earlier to contain the details of the site that we are creating. - Create a new file in this directory and call it “run.bat”
- Edit the run.bat and put in the following text:
start c:/hugo/sites/example.com/content/posts
start chrome http://localhost:1313
hugo server -DF
- Save the run.bat file
- Now when you want to quickly make some changes, just double click the run.bat file.
For more information, check out: