Age | Commit message (Collapse) | Author |
|
Add template function that will build a string from the given format
string and arguments, then log it to ERROR. This has an intended
side-effect of causing the build to fail, when executed.
Resolves #3817
|
|
Changes fall into one of the following:
- gofmt -s
- receiver name is inconsistent
- omit unused 2nd value from range
- godoc comment formed incorrectly
- err assigned and not used
- if block ends with a return statement followed by else
|
|
Fixes #3839
|
|
Add a template function that allows conversion to float. This is
useful, for example, when passing aspect ratios into templates,
which tend to not be integers.
Fixes #3307
|
|
|
|
|
|
|
|
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config.
Fixes #3888
|
|
Add a urls.Parse template function that front-ends url.Parse from the Go
stdlib.
Fixes #3849
|
|
Ceil and Floor are frontends for the stdlib math functions. The Round
implementation is essentially the same thing except that the Go stdlib
doesn't include a Round implementation in a stable release yet. I've
included the Round function slated for Go 1.10.
Fixes #3883
|
|
Fixes #3898
|
|
|
|
Fixes #3876
|
|
And with time.Duration with the convenient alias `duration`:
```
{{ mul 60 60 | duration "second" }}
```
Fixes #3828
|
|
Fixes #3860
|
|
This closes #98, even if this commit does not do full content text search.
We may revisit that problem in the future, but that deserves its own issue.
Fixes #98
|
|
Changed disqus urls from http to https. This fixes mixed content warnings on browsers when viewing Hugo websites over SSL (https).
|
|
|
|
These funcs were added during the move to namespaces but were
undocumented. This commit fixes the order of the arguments and adds the
funcs to the method mapping.
|
|
|
|
And use it in `eq` and `ne` so `Page` values can be compared directly in the templates without thinking about it being a `Page` or a `PageOutput` wrapper.
Fixes #3807
|
|
To accommodate modern web accessibility as outlined here https://dequeuniversity.com/tips/provide-iframe-titles
|
|
Fixes #3040
|
|
And some other minor issues.
|
|
|
|
As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
|
|
Original package has received updates the fork hasn't.
Without fork updates are easier to maintain.
|
|
This works for the `title` func and the other places where Hugo makes title case.
* AP style (new default)
* Chicago style
* Go style (what we have today)
Fixes #989
|
|
Fixes #3744
|
|
Fixes #3718
|
|
Use a hash for the cache key, to fix 'file name too long' errors when retreiving from long urls
Fixes #3690
|
|
Now fall back to `images` set in site config for twitter card.
Fixes #3711
|
|
See #3686
|
|
Fixes #3686
|
|
This enables `AND` (`intersect`) and `OR` (`union`) filters when combined with `where`.
Example:
```go
{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
```
The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params.
Fixes #3174
|
|
Fixes #1468
|
|
It might be very useful for building tag clouds.
|
|
Fixes #3529
|
|
Fixes #2635
Closes #2646
|
|
In accordance to the official guide: https://disqus.com/admin/universal/
|
|
* Improve the built-in Disqus template
Set `disqus_identifier`, `disqus_title`, and `disqus_url`
only if the user has explicitly provided them.
Do not load Disqus when the website is previewed locally,
otherwise it is very confusing.
* Use disqus_config instead of three global variables
https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
|
|
|
|
|
|
|
|
|
|
Fixes #3411
|
|
|
|
Also add tests for ToInt and ToString.
Resolves #3308
|
|
|
|
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
|