Bjørn Erik Pedersen
7c3dceeaed
Fix buggy Menu.Limit()
2016-02-06 22:53:59 +01:00
Bjørn Erik Pedersen
a95426d40c
Remove Printf in test
2016-02-06 22:19:58 +01:00
Bjørn Erik Pedersen
88a320fb2d
Fix buggy Pages.Limit
...
Also add missing page sort related tests.
2016-02-06 22:10:36 +01:00
Bjørn Erik Pedersen
318a984526
Apply gofmt -s
2016-02-06 13:09:52 +01:00
Tatsushi Demachi
68e2e63d92
Fix Hugo hang up with empty content directory
...
Site.ReadPagesFromSource returns nil chan error value when a site
content directory is empty but its receiver expects to be passed
something error values via the channel.
This fixes it by returning a channel which will be immediately closed.
Fix #1797
2016-02-03 08:19:02 +09:00
Anthony Fok
57eebbf243
Use FEEDBACK instead of ERROR for empty home page warning
...
jww.ERROR.Println() seems to have become too verbose,
making the warning message intended for new users
a lot less readable.
2016-01-30 17:39:17 +08:00
Bjørn Erik Pedersen
5def6d9aee
Make the watch logger less chatty
2016-01-28 15:33:41 +01:00
Steve Francia
d08e4c87a7
Rewrite commentary on static event handling
2016-01-26 14:56:42 -05:00
Steve Francia
9413cf8499
Handle self rename operations gracefully
2016-01-26 14:33:08 -05:00
Steve Francia
7e196a8294
Handle remove & rename source operations incrementally
2016-01-26 14:30:28 -05:00
Steve Francia
e01c340915
A single file can be replaced in site.Files
2016-01-26 14:29:37 -05:00
Steve Francia
45e5091428
Process only the source content that has changed
2016-01-26 14:28:53 -05:00
Steve Francia
9f3796a31d
Read/reread individual source content files
...
next is incremental conversion
2016-01-26 14:26:23 -05:00
Steve Francia
ca6ca4f4fc
Separate handling content, data and template changes
...
Data & Templates reading independently
Need to work on page source reading and other source files
2016-01-26 14:25:39 -05:00
Steve Francia
bcc42c0549
Separate reading source and processing source operations
2016-01-25 14:41:47 -05:00
Bjørn Erik Pedersen
3526afc773
Fix some Go vet errors
2016-01-16 00:28:48 +01:00
Bjørn Erik Pedersen
78f9bf2444
Add one more menu test
...
See #1774
2016-01-14 17:30:05 +01:00
Bjørn Erik Pedersen
ab70e6f52f
Add menu test for external URL
...
See #1774
2016-01-14 15:14:21 +01:00
Bjørn Erik Pedersen
1ce184b7f1
Add some p-wrap shortcode tests
...
Deliberetely made to pass, even if they (probably) should not.
See #1642
2016-01-09 16:11:38 +01:00
Bjørn Erik Pedersen
48870fef2e
Group vars in paginator
...
It's easier to read.
2016-01-08 22:55:19 +01:00
Ivan Fraixedes
9a6dc6c791
Add embeded template for robots.txt
2016-01-05 23:36:16 +01:00
Daniel Martí
7c5a1fd16b
Replace *bytes.Buffer with io.Writer in rendering
...
Found via github.com/mvdan/interfacer.
2016-01-05 23:32:03 +01:00
Bjørn Erik Pedersen
9ff36c5a8f
Add some trailing newline shortcode tests
...
See #1753
2016-01-04 23:48:05 +01:00
Alexandre Bourget
dcad066025
Small refactor: don't call p.Permalink()
for all aliases, call it only
...
once and only if necessary.
2016-01-04 12:41:06 -05:00
Gerben Castel
6cdb8109cf
Allow renaming of sitemap.xml
2016-01-04 12:28:49 -05:00
Sven Dowideit
0f6b334b67
Source file based relative linking
...
ala GitHub repository markdown for both md files and non-md files
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-01 15:23:11 -05:00
Sven Dowideit
b78f13b041
Write a simplistic test for site.refLink
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-01 14:50:37 -05:00
digitalcraftsman
47587321d9
Add themesDir option to configuration
...
themesDir can be used to change the default
path of the themes folder.
Fixes 1556
2016-01-01 14:46:40 -05:00
Bjørn Erik Pedersen
7a5a52f468
Clean up the loop counter variables confusion in TestPageCache
...
See #1601
2015-12-19 15:38:28 +01:00
Bjørn Erik Pedersen
9edc58a03a
Fix failing template related tests in Go 1.6
...
Fixes #1470
2015-12-18 15:28:43 +01:00
Bjørn Erik Pedersen
8cea428802
Fix data race in non-renderable pages
...
Fixes #1601
2015-12-18 11:24:35 +01:00
Bjørn Erik Pedersen
0c01fef321
Fix 2 data races in TestPageCache
...
See #1601
2015-12-18 09:35:14 +01:00
Bjørn Erik Pedersen
9569d116cb
Duplicate p.Description in Params map
...
Fixes #1484
2015-12-12 22:20:26 +01:00
Anthony Fok
8509727fe8
Add copyright header to that source files that don’t have one.
...
See #1646
2015-12-10 15:19:38 -07:00
Bjørn Erik Pedersen
e445c35d6a
Fix copyright headers in source files
...
Still need to add some missing headers and an AUTHORS file.
See #1646
2015-12-07 19:57:01 +01:00
Anthony Fok
f13db9328b
Sort and remove "" from "Available templates" list
2015-12-06 23:23:54 -07:00
gunnaraasen
d35d82060f
Remove transformation of menu URLs
...
Fixes #1239
2015-12-06 15:25:23 +01:00
Bjørn Erik Pedersen
69c28985ea
Fix broken Highlight test
2015-12-03 12:37:48 +01:00
Bjørn Erik Pedersen
3f0f7eed68
Improve error handling in commands
...
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.
This commit introduces that by changing all the command funcs to `RunE`:
* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)
Fixes #1502
2015-12-02 07:07:05 -07:00
Anthony Fok
0d1d33d7f3
Print error when /index.html is zero-length
...
Also print warning (in verbose mode) for other empty pages.
See #947
2015-12-01 21:03:17 -07:00
Anthony Fok
f8302768c7
Run go fmt hugolib/site.go
2015-12-01 21:01:19 -07:00
Steve Francia
f045d7a611
Change the license to Apache 2.0
2015-11-23 22:16:36 -05:00
Kato Kazuyoshi
99acbb2eb2
Permalink on Node and Page should be of string
...
This change fixes #1384 .
2015-11-23 17:41:29 +01:00
Marek Janda
5838420aa1
Move blackfriday site-wide config loading to NewBlackFriday()
2015-11-23 17:35:36 +01:00
Cameron Moore
fde47c5eb9
Add shortcode IsNamedParams property
...
It would be helpful to know whether a shortcode was called with positional or
named parameters. This commit adds a boolean `IsNamedParams` property to the
`ShortcodeWithPage` struct.
2015-11-23 17:17:18 +01:00
Bjørn Erik Pedersen
6fa7f2ac3e
Avoid multiple locks for shortcode template
...
Fixes #1600
2015-11-21 23:29:58 +01:00
Bjørn Erik Pedersen
c5f40e8b8b
Improve RW-locking of template in shortcode handling
...
See #1599
2015-11-21 21:57:26 +01:00
Bjørn Erik Pedersen
58c446f562
Fix recently introduced new data race in the shortcode handling
...
Fixes #1599
2015-11-21 20:03:18 +01:00
Cameron Moore
3abb2675c5
Add RSSLink to SiteInfo
2015-11-20 23:38:15 +01:00
Cameron Moore
05c29ad593
Return error if shortcode template.Tree is nil
...
If a shortcode template fails to compile, the template will be non-nil, but
template.Tree will be nil which caused a panic.
2015-11-20 23:34:30 +01:00