Age | Commit message (Collapse) | Author |
|
This commmit prepares for the addition of Goldmark as the new Markdown renderer in Hugo.
This introduces a new `markup` package with some common interfaces and each implementation in its own package.
See #5963
|
|
See #3974
|
|
Add an optional "title" attribute to the iframe in the vimeo shortcode. If one is not given, the title attribute will default to "vimeo video". It is imperative for iframes to have a non-empty "title" attribute in order to meet WCAG2.0 accessibility guidelines https://www.w3.org/TR/WCAG20-TECHS/H64.
|
|
Modified the messages functions after, first, and last threw on being passed invalid parameters (index or limit) to be more standardised and resemble what Go compiler would throw.
Fixes #6415
|
|
Modified the if conditional because of which last threw an error if 0 was passed as limit. The function now returns an empty slice if it is called with 0 as limit. The behavior of first and last is now the same when 0 is passed as limit. Also added tests to test the new behavior.
Fixes #6419
|
|
Modified the if conditional because of which after threw an error if called with 0 as index. The function now returns the whole original slice if 0 is passed as an index. Also added tests to test the new behavior.
Fixes #6388
|
|
This broke for the Twitter simple shortcode now that Shortcodes accepts typed arguments.
Fixes #6382
|
|
To add support for new emojis in Hugo, we need to upgrade our internal
dependency on the emoji package.
Note that we also need to update our tests, as the underlying emoji that
is rendered has changed.
Follow-up to #6391. (170f18d9352d39213170dd9d5e947eb45854c84b and
2df5d202c6fc6eb18ee0b259c3dd1156094947c5)
|
|
This means that you now can do:
{{< vidur 9KvBeKu false true 32 3.14 >}}
And the boolean and numeric values will be converted to `bool`, `int` and `float64`.
If you want these to be strings, they must be quoted:
{{< vidur 9KvBeKu "false" "true" "32" "3.14" >}}
Fixes #6371
|
|
This could be a security and performance issue.
See https://developers.google.com/web/tools/lighthouse/audits/noopener
|
|
|
|
Fixes #6237
|
|
[ci skip]
See #6255
|
|
|
|
With this you can do variants of this:
```
{{ $img := resources.Get "images/misc/3-jenny.jpg" }}
{{ $img := $img.Resize "300x" }}
{{ $g1 := $img.Filter images.Grayscale }}
{{ $g2 := $img | images.Filter (images.Saturate 30) (images.GaussianBlur 3) }}
```
Fixes #6255
|
|
This commit pulls most of the image related logic into its own package, to make it easier to reason about and extend.
This is also a rewrite of the transformation logic used in Hugo Pipes, mostly to allow constructs like the one below:
{{ ($myimg | fingerprint ).Width }}
Fixes #5903
Fixes #6234
Fixes #6266
|
|
This is in line with how it was in Hugo 0.56.
See #6238
|
|
See #6238
|
|
Fix #6190
|
|
|
|
No need to convert these types.
|
|
Dropped/fixed ineffectual assignments after static code analysis.
|
|
- Use bytes.Equal instead of bytes.Compare
- Omit range's value where it's unused
|
|
This is preparation for #6041.
For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.
This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.
This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:
This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix.
Fixes #6154
Fixes #6153
Fixes #6152
|
|
|
|
|
|
|
|
Implement lexicographically string sorting
|
|
This is in line with how it behaved before, but it was lifted a little for the project mount for Hugo Modules,
but that could create hard-to-detect loops.
|
|
This commit implements Hugo Modules.
This is a broad subject, but some keywords include:
* A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project.
* A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects.
* Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running.
* Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions.
* A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`.
All of the above is backed by Go Modules.
Fixes #5973
Fixes #5996
Fixes #6010
Fixes #5911
Fixes #5940
Fixes #6074
Fixes #6082
Fixes #6092
|
|
Merges two maps recursively and returns a new one. Merge is case-insensitive.
Fixes #5992
|
|
|
|
When using a html link checker with Hugo, this template consistently causes errors, as it renders `href=""` attributes when next/previous is disabled.
This change makes it so that the `href` attribute is not rendered at all if `HasNext` is false - which is better semantically, and makes link checking far easier.
|
|
The `sort` template func was producing a `[]page.Page` which did not work in `.Paginate`.
Fixes #6023
|
|
Hugo `0.55.0` introduced some new interface types for `Page` etc.
This worked great in general, but there were cases where this would fail in `where` and `sort`.
One such example would be sorting by `MenuItem.Page.Date` where `Page` on `MenuItem` was a small subset of the bigger `page.Page` interface.
This commit fixes that by unwrapping such interface values.
Fixes #5989
|
|
Fixes #5685
|
|
According to google, this is no longer supported and structured data should be used instead: https://support.google.com/webmasters/answer/6083347?hl=en
|
|
The `safeHTMLAttr` function operates on a full attribute definition, not
just within the attribute value.
Docs: https://gohugo.io/functions/safehtmlattr/
For `opengraph.html`, run the whole `content` HTML attribute through
`safeHTMLAttr`. That will preserve `+` signs in formatted dates.
For `vimeo_simple.html`, `safeHTMLAttr` was in the context of an
attribute value, thus having no effect. In this case we could replace it
with `safeURL`, but since the code is coming from an API it is safer to
just let Go's template engine sanitize the value as it already does with
`provider_url`.
Fixes #5236 (no need to change Go upstream)
Related to #5246
|
|
To get fewer top level packages.
|
|
Fixes #5905
|
|
|
|
|
|
```bash
benchmark old ns/op new ns/op delta
BenchmarkSiteNew/Bundle_with_image-4 14572242 14382188 -1.30%
BenchmarkSiteNew/Bundle_with_JSON_file-4 13683922 13738196 +0.40%
BenchmarkSiteNew/Multiple_languages-4 41912231 25192494 -39.89%
benchmark old allocs new allocs delta
BenchmarkSiteNew/Bundle_with_image-4 57496 57493 -0.01%
BenchmarkSiteNew/Bundle_with_JSON_file-4 57492 57501 +0.02%
BenchmarkSiteNew/Multiple_languages-4 242422 118809 -50.99%
benchmark old bytes new bytes delta
BenchmarkSiteNew/Bundle_with_image-4 3845077 3844065 -0.03%
BenchmarkSiteNew/Bundle_with_JSON_file-4 3627442 3627798 +0.01%
BenchmarkSiteNew/Multiple_languages-4 13963502 7543885 -45.97%
```
Fixes #5890
|
|
See #5875
|
|
Fixes #5875
|
|
Fixes #5852
|
|
Fixes #5865
|
|
Fixes #5863
|
|
Fixes #5834
|
|
* Rewind paginator for server mode
* Add some more related tests.
* Replace the clumsy scratch constructs in internal paginator template with variables
See #5825
|