From 4c67bda8c4d3c4e87eeec9e958a3720fa085ffdf Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sun, 8 May 2016 12:52:34 -0500 Subject: [PATCH] ulimit, ugh. Former-commit-id: f140b5de753853dd3386678857ff2f3205a10a4b --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c562372d0d9..90b55fa6c0e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,27 @@ If you'd like to edit a specific devopsdays event site (and/or contribute code), ### Setup 1. Install [Hugo v0.15+](http://gohugo.io) 1. Fork this repo + +### View site locally 1. To watch for changes and rebuild on the fly, open a new terminal, cd to your fork of the repo, and enter this command: `hugo server -w --baseUrl="http://localhost:1313"` +1. OS X has low ulimits, so you may see this message: +``` +hugo server -w --baseUrl="http://localhost:1313” +[...] +Error: listen tcp 127.0.0.1:1313: socket: too many open files +``` + +You can correct it with this: +``` + $ hugo check ulimit + $ sudo sysctl -w kern.maxfiles=65536 + $ sudo sysctl -w kern.maxfilesperproc=65536 + $ ulimit -n 65536 65536 +``` +Then in a new window: +``` + $ hugo server -w --baseUrl="http://localhost:1313" +``` ### Contribute changes 1. Code changes that affect the overall site will be reviewed only if they are in a separate pull request from any event-specific content. tl;dr: don't add "giant template change" in the same PR as "here are some more sponsors". If it affects anything other than your event, it should be in its own PR.