Age | Commit message (Collapse) | Author |
|
Fixes #1484
|
|
See #1646
|
|
Still need to add some missing headers and an AUTHORS file.
See #1646
|
|
|
|
Fixes #1239
|
|
|
|
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
|
|
Also print warning (in verbose mode) for other empty pages.
See #947
|
|
|
|
|
|
This change fixes #1384.
|
|
|
|
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.
|
|
Fixes #1600
|
|
See #1599
|
|
Fixes #1599
|
|
|
|
If a shortcode template fails to compile, the template will be non-nil, but
template.Tree will be nil which caused a panic.
|
|
Currently a `[]byte` copy is returned. In most cases this is the safe thing to do, but we should just modify/grow the slice as needed.
This is faster and consumes less memory:
```
benchmark old ns/op new ns/op delta
BenchmarkReplaceShortcodeTokens-4 7350 4419 -39.88%
benchmark old allocs new allocs delta
BenchmarkReplaceShortcodeTokens-4 5 1 -80.00%
benchmark old bytes new bytes delta
BenchmarkReplaceShortcodeTokens-4 4816 1152 -76.08%
```
This commit is aso a small spring cleaning of duplicated code in the different `PageConvert` methods.
Fixes #1516
|
|
|
|
|
|
So we can see the real numbers.
See #1516
|
|
Page.GroupByParam function internally uses Page.GetParam to get a
parameter value for a key of a page group but now Page.GetParam returns
a lowercase character string every time. It has no need to using
lowercase character string as a group key value and it confuse a
function user.
This fixes it to keep and return an original parameter string as a group
key value.
Fix #1564
|
|
Fixes #1562
|
|
This commits also adds the GoogleAnalytics
variable to insert the tracking code.
Fixes #1424.
|
|
And at the same time rename and unexport the badly named `Layout()` func. That method is not very usable outside the package.
Fixes #1539
|
|
This change fixes #1410.
|
|
|
|
This is a convenience method to do lookups in Page's (Page only) and Site's Params map (Page and Node), in that order.
Fixes #1462
|
|
* add global `hasCJKLanguage` flag, if true, turn on auto-detecting CJKLanguage
* add `isCJKLanguage` frontmatter to force specify whether is CJKLanguage or not
* For .Summary: If isCJKLanguage is true, use the runes as basis for truncation, else keep as today.
* For WordCount: If isCJKLanguage is true, use the runes as basis for calculation, else keep as today.
* Unexport RuneCount
Fixes #1377
|
|
|
|
Fixes #1428
|
|
Add validation before creating aliases:
* Prevent creating aliases outside webroot (public/ dir)
* Skip empty "" alias
* Skip "/" → "/index.html", which gets overwritten anyway
* Refuse to create Windows-invalid filenames on Windows;
warn on other platforms
* In case of invalid aliases, after skipping them,
return `err = nil` to prevent the error passing up
all the way to `hugolib.Render()` and causing Hugo to abort.
* Update alias tests.
Fixes #701: Add support for alias with whitespace
Fixes #1418: Add validation for alias
|
|
See #959
|
|
|
|
Enabling this prevents lowercasing of the path/url.
Fixes #557
|
|
|
|
A new "published" setting that is the opposite of "draft" is added and
left intentionally undocumented.
This setting comes from jekyll and eases the transition to hugo
greatly. We leave it undocumented so that folks don't rely on it, but
also don't shoot themselves in the foot during a jekyll migration.
The foot-shooting occurs if they have only a few documents that were
drafts ("published: false") in the jekyll version of their site and
don't notice that they were published in the migration to hugo.
|
|
The 404 pages etc. need a better solution, but fix this issue for now.
Fixes #1336
|
|
Fixes #1337
|
|
Fixes #1335
|
|
|
|
|
|
Special thanks to @bep for his guidance and
for making sure all of the Hugo themes get updated.
Fixes #1172
|
|
Fixes #1306
|
|
Fixes #768
|
|
Fixes #1188
|
|
Which is a Go 1.5 func.
See #1299
|
|
See #1299
|
|
Fixes #1299
|