Commit graph

2176 commits

Author SHA1 Message Date
Bjørn Erik Pedersen 3950b1375c hugolib: Camelcase ALL_CAPS vars and const in tests
See #2014
2016-04-07 16:10:41 +02:00
Bjørn Erik Pedersen 05b888877d huglib: Add even more missing GoDoc
See #2014
2016-04-07 16:05:23 +02:00
Bjørn Erik Pedersen 85bcac530a source: Add missing GoDoc in File
See #2014
2016-04-07 15:44:53 +02:00
Bjørn Erik Pedersen ddd02b2f6a hugolib: Camel-case ALL_CAPS const in test 2016-04-07 15:22:41 +02:00
Bjørn Erik Pedersen 98ee8c3f7b hugolib: Add GoDoc to pageGroup.go
See #2014
2016-04-07 15:21:41 +02:00
Bjørn Erik Pedersen 57c347e4cc hugofs: Fix GoDoc 2016-04-07 13:56:11 +02:00
Bjørn Erik Pedersen 969f9311c1 Build Hugo in Travis with race detection enabled 2016-04-07 13:40:18 +02:00
Bjørn Erik Pedersen fd5d573566 Add go test -race to make check 2016-04-07 13:36:48 +02:00
Bjørn Erik Pedersen 27f9e62bb3 Remove Wercker badge
See #2054
2016-04-07 13:28:26 +02:00
digitalcraftsman 5bfe16ef8d tpl: Add findRE template func 2016-04-05 22:26:03 +02:00
Bjørn Erik Pedersen 54750b0780 Do not create robots.txt by default
Meny people, including me, have a custom robots.txt in static.

Also remove that option from the command line; it doesn't feel
important enough.

Fixes ##2049
2016-04-05 22:20:39 +02:00
Philipp Oppermann 43b5dfabb5 Disable syntax guessing for PygmentsCodeFences by default
This disables highlighting for fenced code blocks without explicitly specified language. It also introduces a new `PygmentsCodeFencesGuessSyntax` config option (defaulting to false).

To enable syntax guessing again, add the following to your config file: `PygmentsCodeFencesGuessSyntax = true`

This is a breaking change.
2016-04-04 22:19:36 +02:00
ysqi 0698f294c6 docs: Add yushuangqi.com to the showcase 2016-04-04 20:37:39 +02:00
digitalcraftsman dea06f863e docs: embed YouTube video in Windows installation tutorial 2016-04-03 14:28:12 +02:00
JohnBlood 2304614639 docs: Update set PATH instructions for Windows 2016-04-03 14:22:50 +02:00
Robert Basic 21e0515fed docs: Fix menu in firefox
Fixes #1875
2016-04-03 14:04:48 +02:00
JohnBlood 1adf40355b docs: Add alternative for Wordpress import
I have had trouble getting the Wordpress to Hugo exporter working, so I
added this tip for others to take advantage of.
2016-04-03 13:35:42 +02:00
Bjørn Erik Pedersen f0dbf2c88f tpl: Add the other test case for hasPrefix 2016-04-03 01:59:47 +02:00
Bjørn Erik Pedersen aaee038581 tpl: Sort the smoke tests 2016-04-03 01:57:22 +02:00
digitalcraftsman 80d02a14ab tpl: Add hasPrefix to the template funcs' "smoke test" 2016-04-03 01:30:14 +02:00
digitalcraftsman 4502c4e3ae docs: Add documentation for hasPrefix template func
Fixes #2039
2016-04-03 00:44:43 +02:00
Cameron Moore fe929114d3 tpl: Fix panic in sort of nil sequence
Properly handle a nil sequence in the sortSeq function.  Test included.
Discovered while using `range sort .Site.Data.source.Undefined "foo"`.
2016-04-02 23:06:48 +02:00
Cameron Moore d15fda5000 tpl: Fix panic in pairList.Less
While sorting on data sources with missing fields, a panic can occur in
pairList.Less if `Interface()` is called on a invalid `reflect.Value`.
This commit detects an invalid Value and replacing it with a zero value
for the comparison.
2016-04-02 23:01:36 +02:00
Robert Basic 7d5c9fbf44 Make ByCount sort consistently
When two or more taxonomies have the same number of pages,
sort them by name to have consistent ByCount sorting of
taxonomies.

Fixes #1930
2016-04-02 22:59:10 +02:00
Bjørn Erik Pedersen c6c2c689d6 hugofs: Add missing not nil checks to tests 2016-04-02 01:23:12 +02:00
Bjørn Erik Pedersen b678e90db7 Use to most specific interface in WriteDestPage 2016-04-02 00:04:08 +02:00
Bjørn Erik Pedersen c2277fcbc1 docs: Add doc and a test for readDir
Fixes #2009
2016-03-31 23:16:42 +02:00
Bjørn Erik Pedersen cb89ae63e9 tpl: Make readDir use the WorkingDir fs
Fixes #2010
2016-03-31 23:06:51 +02:00
Bjørn Erik Pedersen 4f66f790b1 Add readFile template func
This also includes a refactor of the hugofs package and its usage.

The motivation for that is:

The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...)

Fixes #1551
2016-03-31 21:24:18 +02:00
digitalcraftsman a89035bdaa docs: Mention CLA in the showcase contribution guidelines 2016-03-30 18:01:50 +02:00
Rob Muhlestein 6a3a6f683d docs: Remove incorrent reference to list.html 2016-03-30 17:54:31 +02:00
digitalcraftsman 93e41a1fb2 docs: Fix typo in templates/functions.md 2016-03-28 17:04:29 +02:00
Rob Muhlestein d65fbfe16c docs: Add surge.sh to main page of static site hosters
See #1994
2016-03-28 16:44:13 +02:00
Robert Basic effaf6c2c9 docs: Document GitHub flavoured code fences
Fixes #1259
2016-03-28 16:38:28 +02:00
Robert Basic e35a69216e docs: Document lastmod variable
Fixes #1351
2016-03-28 16:33:50 +02:00
Robert Basic 50506ebeac docs: Document the split function
Fixes #1997
2016-03-28 15:58:41 +02:00
Scopel Emanuele 4c95b70020 docs: Add silvergeko.it to the showcase 2016-03-28 14:48:01 +02:00
Robert Basic 79af7143c9 docs: Add robertbasic.com to the showcase 2016-03-27 19:52:07 +02:00
Bjørn Erik Pedersen dbfc7ea024 Fix error handling in SymbolicWalk 2016-03-25 18:18:39 +01:00
Bjørn Erik Pedersen bfe8009415 helpers: Fix SymbolicWalk for the root folder
handle the root folders themselves.

This commit fixes that.

Fixes #2018
2016-03-25 12:49:23 +01:00
digitalcraftsman 977b0e342c docs: Adapt commit message for showcase additions 2016-03-25 12:32:46 +01:00
digitalcraftsman 8890885a70 docs: Add search form powered by Algolia 2016-03-25 11:22:01 +01:00
Bjørn Erik Pedersen 8aec5ee2dd hugolib: Some more unexports 2016-03-25 03:12:31 +01:00
digitalcraftsman 7c81c86bdd commands: Apply Golint rules 2016-03-24 23:34:12 +01:00
digitalcraftsman 5d3705df16 helpers: Apply GoLint rules 2016-03-24 23:16:18 +01:00
digitalcraftsman 7fa2cec906 tpl: Small Golint fixes 2016-03-24 22:56:50 +01:00
Bjørn Erik Pedersen b71f391cd7 parser: Remove unused vars 2016-03-24 21:34:34 +01:00
Bjørn Erik Pedersen 6dbae7b671 Be explicit about the type in Scratch test
A puzzle, but it sometimes produces a int64 as it is now.
2016-03-24 19:57:26 +01:00
Bjørn Erik Pedersen d770130530 hugolib: Remove unused Tmpl on Page 2016-03-24 18:34:41 +01:00
Bjørn Erik Pedersen c846b051f3 Do not use defer for unlocking in Scratch
It is a fairly costly operation:

```
benchmark                 old ns/op     new ns/op     delta
BenchmarkScratchGet-4     109           31.6          -71.01%

benchmark                 old allocs     new allocs     delta
BenchmarkScratchGet-4     0              0              +0.00%

benchmark                 old bytes     new bytes     delta
BenchmarkScratchGet-4     0             0             +0.00%
´´´
2016-03-24 16:03:31 +01:00