Cameron Moore
0004a733c8
tpl: Fix metrics hint tracking
...
When tracking for cache hints, track the same template name as the call
to MeasureSince in Execute. When referencing a partial "foo", the value
of `n` does not match `templ.Name()` (`partials/foo` versus
`partials/foo.html`). This was causing hints to go untracked since
there was no existing metric to append the hint to.
Fixes #8125
2021-01-08 20:01:11 +01:00
Cameron Moore
8a26ab0bc5
tpl: Do not return errors in substr for out-of-bounds cases
...
Most other substr implementations don't error out in out-of-bounds cases
but simply return an empty string (or a value that's printed as an empty
string). We'll follow their lead and not exit template execution. Allow
the user decide what to do with the empty result.
Fixes #8113
2021-01-08 10:13:10 +01:00
Cameron Moore
788e50ad3a
tpl: Add missing test scenario for strings.Substr
2021-01-08 10:13:10 +01:00
Bjørn Erik Pedersen
4d2b6fc4c0
Run go mod tidy
2021-01-03 18:48:35 +01:00
Niklas Fasching
212e5e5542
deps: Update go-org to v1.4.0
...
- Add support for pretty urls [1]. Rewrite file links:
1. replace the `.org` extension with `/` (`/foo.org` -> `/foo/`)
2. prefix unrooted links with `../` as relative links start in the fake
subdirectory `/foo/` rather than `/`
- Fix case-sensitivity of org drawer `🔚 `
[1] https://gohugo.io/content-management/urls/#pretty-urls
2021-01-02 22:29:06 +01:00
Bjørn Erik Pedersen
4fdec67b11
rst: Adjust log level
2021-01-01 11:50:13 +01:00
hugoreleaser
9b681ecfbd
releaser: Prepare repository for 0.81.0-DEV
...
[ci skip]
2020-12-31 13:49:02 +00:00
hugoreleaser
792ef0f41a
releaser: Add release notes to /docs for release of 0.80.0
...
[ci skip]
2020-12-31 13:36:35 +00:00
hugoreleaser
5b3fc1c673
releaser: Bump versions for release of 0.80.0
...
[ci skip]
2020-12-31 13:36:35 +00:00
Bjørn Erik Pedersen
63a33afee7
Update 0.80.0-relnotes.md
2020-12-31 14:26:00 +01:00
hugoreleaser
69aa3d4599
releaser: Add release notes for 0.80.0
...
Rename to *-ready.md to continue.
[ci skip]
2020-12-31 13:09:24 +00:00
Bjørn Erik Pedersen
ffbf5e45fa
Allow Dart Sass transformations to be cached on disk
...
This enbles people to build their sites/themes on servers where the Dart Sass binary is not available.
2020-12-31 11:32:20 +01:00
Bjørn Erik Pedersen
48994ea766
dartsass: Dart Sass only supports expanded
and compressed
2020-12-31 11:18:54 +01:00
Bjørn Erik Pedersen
428b0b3294
dartsass: Add missing OutputStyle option
2020-12-31 10:49:59 +01:00
Cameron Moore
1f7e9f7333
Update emoji import paths and version
...
Since emoji is v2, we must import it with the `/v2` suffix. Doing so
allows the Go tools to detect the latest release.
2020-12-30 22:46:19 +01:00
Bjørn Erik Pedersen
cea1574023
Add Dart Sass support
...
But note that the Dart Sass Embedded Protocol is still in beta (beta 5), a main release scheduled for Q1 2021.
Fixes #7380
Fixes #8102
2020-12-30 17:32:25 +01:00
Horst Gutmann
f9f779786e
GroupByParamDate now supports datetimes
...
Previously, the method only worked for date strings but not (for
instance) full RFC3339 datetime strings.
2020-12-28 17:50:55 +01:00
Bjørn Erik Pedersen
a9718f44cd
para: Skip para test when not on CI
...
Fixes #6963
2020-12-23 19:47:20 +01:00
Bjørn Erik Pedersen
f802bb236a
Update SECURITY.md
2020-12-22 10:09:59 +01:00
hugoreleaser
6c29418278
releaser: Add release notes to /docs for release of 0.79.1
...
[ci skip]
2020-12-19 17:09:29 +01:00
Bjørn Erik Pedersen
10ae7c3210
Improve LookPath
2020-12-19 17:03:07 +01:00
Patrick Kollitsch
ae2d1bd52d
docs: create a SECURITY.md
...
This file is used by Github as a tab on the repos homepage to access information about how to report security issues. The text is kept simple.
Will solve #8074
2020-12-18 17:55:49 +01:00
Bjørn Erik Pedersen
81975f847d
Fix Resource.ResourceType so it always returns MIME's main type
...
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`.
Fixes #8052
2020-12-17 22:20:12 +01:00
Cameron Moore
8103188b9b
para: Show more detail on failed time test
...
Give us more visibility into how badly a given host is failing in the
time test.
Updates #6963
2020-12-17 22:19:17 +01:00
Bjørn Erik Pedersen
3ba147e702
images: Add images.Overlay filter
...
This allows for constructs ala:
```
{{ $overlay := $img.Filter (images.Overlay $logo 50 50 )}}
```
Or:
```
{{ $logoFilter := (images.Overlay $logo 50 50 ) }}
{{ $overlay := $img | images.Filter $logoFilter }}
```
Which will overlay the logo in the top left corner (x=50, y=50) of `$img`.
Fixes #8057
Fixes #4595
Updates #6731
2020-12-17 09:14:18 +01:00
Bjørn Erik Pedersen
a2d146ec32
tpl: Regenerate templates
2020-12-16 12:20:02 +01:00
Maciej Sawicki
d2d493ab5d
tpl: Fix series detection in opengraph
...
When inside front matter you specified series with spaces,
then the opengraph template wouldn't detect other articles,
because in `.Site.Taxonomies.series` they are stored by
urlized key.
Example:
```yaml
# in front matter
series:
- My Series
```
```gohtml
{{/* in a template */}}
{{- $series := index .Site.Taxonomies.series$name }}
{{/* was resolved to */}}
{{- $series := index {'my-series': ...} "MySeries" }}
```
2020-12-16 12:13:30 +01:00
真夜
ce96895deb
hugolib/paths: Fix typo
2020-12-16 12:12:14 +01:00
Phil Davis
04b89857e1
all: Fix minor typos
2020-12-16 12:11:32 +01:00
Bjørn Erik Pedersen
21fa1e86f2
Fix BenchmarkMergeByLanguage
...
Fixes #7914
2020-12-09 17:47:10 +01:00
Anthony Fok
c84ad8db82
deps: Bump github.com/spf13/cobra from 0.15.0 to 0.20.0
...
The substring match in TestExecute deploy test is adjusted accordingly.
2020-12-04 20:43:03 -07:00
Patrick Kollitsch
4e0acb89b7
chore: configure proper link to discourse.gohugo.io ( #8020 )
...
* chore: configure proper link to discourse.gohugo.io
This adds a configuration file to the issue templates for this repo. In this config file, an issue template is added that will look like the existing issue templates, but on click will lead directly to the discourse forum instead of hoping that people read what it says there. The support.md can be deleted.
* chore: remove obsolete support.md configuration
* chore: remove obsolete autoclosing workflow
2020-12-04 10:04:35 +01:00
Bjørn Erik Pedersen
718e09ed4b
tpl/internal/go_templates: Revert formatting
...
Should make future fork synch easier.
2020-12-03 13:47:43 +01:00
Bjørn Erik Pedersen
d90e37e0c6
all: Format code with gofumpt
...
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
dependabot[bot]
32471b57bd
build(deps): bump github.com/evanw/esbuild from 0.8.15 to 0.8.17
...
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild ) from 0.8.15 to 0.8.17.
- [Release notes](https://github.com/evanw/esbuild/releases )
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md )
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.15...v0.8.17 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 13:04:16 +01:00
Andrew Zenk
4fc918e02c
tpl: Add title parameter to YouTube shortcode
2020-12-02 12:53:53 +01:00
sth
0ad378b09c
Use --baseURL path for live-reload URL
...
Fixes #6595
2020-12-02 12:52:26 +01:00
ivan-meridianbanc-com
aebfe156fb
Fix RelURL and AbsURL when path starts with language
2020-12-02 12:47:01 +01:00
dependabot[bot]
907d9e9268
build(deps): bump github.com/getkin/kin-openapi from 0.31.0 to 0.32.0
...
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi ) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases )
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.31.0...v0.32.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 12:26:27 +01:00
Cameron Moore
5862fd2a60
tpl: Fix substr when length parameter is zero
...
When length parameter is zero, always return an empty string.
Updates #7993
2020-12-01 23:20:04 +01:00
Cameron Moore
64789fb5dc
tpl: Refactor and fix substr logic
...
Fix miscalculations when start is negative. Results should now match
PHP substr.
Fixes #7993
2020-11-28 11:53:46 +01:00
hugoreleaser
32d4bf68da
releaser: Prepare repository for 0.80.0-DEV
...
[ci skip]
2020-11-27 09:19:04 +00:00
hugoreleaser
1415efdcd8
releaser: Add release notes to /docs for release of 0.79.0
...
[ci skip]
2020-11-27 09:06:36 +00:00
hugoreleaser
4e6bf7907d
releaser: Bump versions for release of 0.79.0
...
[ci skip]
2020-11-27 09:06:36 +00:00
Bjørn Erik Pedersen
50be4370b0
Update 0.79.0-relnotes.md
2020-11-27 09:55:51 +01:00
hugoreleaser
3d2e6a30d4
releaser: Add release notes for 0.79.0
...
Rename to *-ready.md to continue.
[ci skip]
2020-11-27 08:44:33 +00:00
Bjørn Erik Pedersen
4f1e4bb3fe
Merge commit '9f1265fde4b9ef186148337c99f08601633b6056'
2020-11-27 09:30:05 +01:00
Bjørn Erik Pedersen
9f1265fde4
Squashed 'docs/' changes from 57c1d1a67..1de7a358c
...
1de7a358c Clarify that "with" blocks do not render with empty values (#1287 )
b48de8b0a Update js.md
e0124e4b1 Update js.md
087b39d74 Update hosting-on-render.md (#1286 )
8f02b5412 Update js.md (#1284 )
8dd8a8d1d Add link to "Build Websites with Hugo" book (#1174 )
ae2dc138a Fix typo in page bundles (#1283 )
ab14bfec3 Update configuration directory section
17da77ff1 Update multilingual.md (#1280 )
5bce8db3a Fix for site-hierarchy image, issue #60
9d7a2366d Fix typo
ad4210c41 Fix typo
c88bc0383 Fix orphan branch url (#1262 )
1cf6cf5b3 Hugo 0.78.2
538c3cb86 Merge branch 'tempv0.78.2'
e5e07fc81 releaser: Add release notes to /docs for release of 0.78.2
120a61a47 Fixed wrong var assignment example
4cebbb1a7 Ignore remote JSON errors (for now)
618fcf9ba Add a link to modules config option 'replacements'
e12722779 Fix typo ("wil" -> "will") (#1273 )
0670e9894 Update js.md
5bde834cf Update GH docs to say "main" as default branch
26312f93d Update index.md
eb6f51df1 Update js.md
b890dc84d Merge branch 'tempv0.78.1'
6b73ea450 releaser: Add release notes to /docs for release of 0.78.1
46e582112 Update starter-kits.md (#1268 )
a62786235 Update 404 docs: GitLab auto-detects 404.html (#1173 )
cbd4fd2d9 Fix typo (#1271 )
2ba3f9386 Update js.md
7b5109d90 Update js.md
bc75bc962 Release 0.78.0
0b2e8b0f1 releaser: Add release notes to /docs for release of 0.78.0
9ecba8480 Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0'
60a475df7 js: Add avoidTDZ option
3b895261f Make js.Build fully support modules
git-subtree-dir: docs
git-subtree-split: 1de7a358cac94ac09a513456bdaae65e6ae94859
2020-11-27 09:26:24 +01:00
Bjørn Erik Pedersen
d162bbd799
publisher: Fix memory usage in writeStats
...
```
name old time/op new time/op delta
ClassCollectorWriter-16 72.1µs ± 0% 32.3µs ± 0% -55.17% (p=0.029 n=4+4)
name old alloc/op new alloc/op delta
ClassCollectorWriter-16 85.9kB ± 0% 35.1kB ± 0% -59.16% (p=0.029 n=4+4)
name old allocs/op new allocs/op delta
ClassCollectorWriter-16 329 ± 0% 149 ± 0% -54.71% (p=0.029 n=4+4)
```
Fixes #7945
2020-11-27 09:13:16 +01:00
dependabot[bot]
17e0bbe821
build(deps): bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0
...
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml ) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-yaml/yaml/releases )
- [Commits](https://github.com/go-yaml/yaml/compare/v2.3.0...v2.4.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-11-26 21:41:21 +01:00