A local `node_modules` directory can easily contain
tens of thousands of files, easily exhausting the tiny
default max open files limit especially on OS X Yosemite,
in spite of the fact that Hugo already had code in place
since February 2014 to try to raise the maxfiles ulimit.
Also skip `.git` and `bower_components` directories.
The file watching situation will improve when
https://github.com/go-fsnotify/fsevents become ready,
but until then, we will be thrifty. :-)
Thanks to @chibicode for the suggestion.
See #168 for continued discussions.
The extra step isn't needed and this makes the code simpler.
And slightly faster:
benchmark old ns/op new ns/op delta
BenchmarkAbsUrl 19987 17498 -12.45%
BenchmarkXmlAbsUrl 10606 9503 -10.40%
benchmark old allocs new allocs delta
BenchmarkAbsUrl 28 24 -14.29%
BenchmarkXmlAbsUrl 14 12 -14.29%
benchmark old bytes new bytes delta
BenchmarkAbsUrl 3512 3297 -6.12%
BenchmarkXmlAbsUrl 2059 1963 -4.66%
`eq` and `ne` template functions don't work as expected when those are
used with a raw number and a calculated value by add, sub etc. It's
caused by both numbers type differences. For example, `eq 5 (add 2 3)`
returns `false` because raw 5 is `int` while `add 2 3` returns 5 with
`int64`
This normalizes `int`, `uint` and `float` type values to `int64`,
`uint64` and `float64` before comparing them. Other type of value is
passed to comparing function without any changes.
Fix#961
...
Prevent 404.html from prettifying into 404/index.html
Restore @realchaseadams's commit 348e123
"Force `UglyUrls` option to force `404.html` file name"
which got lost after some refactoring (commit 8db3c0b).
Remove the equivalent "force `UglyUrls`" code for `sitemap.xml`
because the refactored code now calls `renderAndWriteXML()`
which uses `WriteDestFile()` which does not prettify a filename.
Fixes#939 (reverted from commit c4c19ad303)
Restore @realchaseadams's commit 348e123
"Force `UglyUrls` option to force `404.html` file name"
which got lost after some refactoring (commit 8db3c0b).
Remove the equivalent "force `UglyUrls`" code for `sitemap.xml`
because the refactored code now calls `renderAndWriteXML()`
which uses `WriteDestFile()` which does not prettify a filename.
Fixes#939
See https://github.com/spf13/hugo/releases
What a pleasant surprise indeed!
How come I have never noticed them before?
And even `.deb` files are provided! How amazing!
Quote from @spf13: "I also think it's the better default
and should continue to be the case going forward."
Also mention the use of `hugo config` to check the current value
of `canonifyurls`, thanks to suggestion by @bep.
Fixes#802
- Clarify that Hugo may be built wherever Go is available;
- Add links to Git, Mercurial and Go;
- Unlist Bazaar: No libraries that Hugo depends on use it any more;
- Suggest the user to simply run `make` to build `hugo`
to get `hugo version` to display the commit hash.
Make sure that the file separator is added to the temp dir in all cases.
This prevents cache temp files being written to the root temp folder.
Fixes#910