Bjørn Erik Pedersen
74e9129568
hugolib: Add an asciidoc rebuild test case
...
See #12375
2024-04-15 15:57:11 +02:00
Bjørn Erik Pedersen
df11327ba9
Pass .RenderShortcodes' Page to render hooks as .PageInner
...
The main use case for this is to resolve links and resources (e.g. images) relative to the included `Page`.
A typical `include` would similar to this:
```handlebars
{{ with site.GetPage (.Get 0) }}
{{ .RenderShortcodes }}
{{ end }}
```
And when used in a Markdown file:
```markdown
{{% include "/posts/p1" %}}
```
Any render hook triggered while rendering `/posts/p1` will get `/posts/p1` when calling `.PageInner`.
Note that
* This is only relevant for shortcodes included with `{{%` that calls `.RenderShortcodes`.
* `.PageInner` is available in all render hooks that, before this commit, received `.Page`.
* `.PageInner` will fall back to the value of `.Page` if not relevant and will always have a value.
Fixes #12356
2024-04-15 09:49:57 +02:00
dependabot[bot]
a18e2bcb9a
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
...
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.
---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-14 17:53:18 +02:00
Joe Mooring
6049ba99f0
helpers: Fix TrimShortHTML when used with AsciiDoc content
...
Fixes #12369
2024-04-14 17:53:05 +02:00
Bjørn Erik Pedersen
8e50ccfae7
github: Add a "free space" step on Ubuntu
2024-04-14 16:42:04 +02:00
Bjørn Erik Pedersen
bfc3122f8e
helpers: Add BenchmarkTrimShortHTML
2024-04-14 15:54:49 +02:00
Bjørn Erik Pedersen
00ae8e8c72
github: Update actions
2024-04-14 13:40:46 +02:00
Bjørn Erik Pedersen
e423e56273
github: Format GitHub actions files
2024-04-14 13:40:46 +02:00
Joe Mooring
09eb822822
hugolib: Display server address after each rebuild
...
Closes #12359
2024-04-13 22:16:00 +02:00
Joe Mooring
a6e8439176
resources/page: Add taxonomies Page method
...
Closes #12316
2024-04-12 16:26:02 +02:00
Bjørn Erik Pedersen
38f68cd162
commands: Adjust completions
2024-04-11 15:34:26 +02:00
Ville Skyttä
a67650b6f7
completion: Improve existing argument completions, add many more
...
Do not offer filenames to arguments not taking one, complete arguments
of options taking resource kinds, directory names, --logLevel, release
--step, config and new --format.
As an internal refactoring, use higher level functions to set flag
completions. SetAnnotation works, but is more verbose than
alternatives, and uses bash specific wording.
While at it, move setting completions next to flag definitions
consistently.
Remove superfluous --destination completer setting, which is already
set elsewhere.
2024-04-11 15:34:26 +02:00
Bjørn Erik Pedersen
2a060b37a3
Upgrade to Go 1.22.2
...
Closes #12351
2024-04-11 15:14:28 +02:00
dependabot[bot]
97df6be59f
build(deps): bump golang.org/x/tools from 0.19.0 to 0.20.0
...
Bumps [golang.org/x/tools](https://github.com/golang/tools ) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/golang/tools/releases )
- [Commits](https://github.com/golang/tools/compare/v0.19.0...v0.20.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/tools
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 14:18:55 +02:00
Bjørn Erik Pedersen
9323376dfa
github: Fix CI build
2024-04-11 13:29:19 +02:00
Eitan Adler
bf0b140364
all: Fix duplicate words in comments
2024-04-11 09:31:33 +02:00
dependabot[bot]
e9b8bec433
build(deps): bump golang.org/x/net from 0.23.0 to 0.24.0
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/net/compare/v0.23.0...v0.24.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 09:29:14 +02:00
dependabot[bot]
888cc1e61e
build(deps): bump github.com/getkin/kin-openapi from 0.123.0 to 0.124.0
...
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi ) from 0.123.0 to 0.124.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases )
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.123.0...v0.124.0 )
---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 09:28:50 +02:00
Christian Oliff
17765a7451
all: Typo fixes
2024-04-11 09:23:17 +02:00
Bjørn Erik Pedersen
92de8625c7
babel: Run go fmt
2024-04-08 18:28:04 +02:00
guangwu
7907935a42
babel: Close file before removing
2024-04-08 15:23:08 +02:00
dependabot[bot]
02d5ec14f3
bump golang.org/x/mod from 0.16.0 to 0.17.0
...
Bumps [golang.org/x/mod](https://github.com/golang/mod ) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/mod/compare/v0.16.0...v0.17.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/mod
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 17:44:24 +02:00
curegit
26640525a3
hugolib: Fix regression for blank summaries
...
Fix regression in content summarization so that we can use empty
summary by using the manual summary divider. Since v0.123, there
has been the regression that causes Hugo to use automatic summary
generation when the manual summary results in an empty string,
even if there is a `<!--more-->` summary divider.
2024-04-05 17:43:55 +02:00
Bjørn Erik Pedersen
488b21d15b
Fix sectionPagesMenu for pages in root level
...
Fixes #12306
2024-04-05 17:38:08 +02:00
Soren L. Hansen
4500b0e423
resources/page: Escape hash sign in permalinks
...
When creating a link to a file with a `#` in the filename, the link gets
truncated. This happens because the filename is eventaully passed to
`url.Parse` which (correctly!) interprets the `#` as fragment separator.
This commit escapes the `#` in the filename before creating the link.
Fixes #4926
Fixes #8232
Fixes #12342
Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>
2024-04-05 15:57:02 +02:00
dependabot[bot]
060cce0a91
build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0
...
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml ) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/pelletier/go-toml/releases )
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml )
- [Commits](https://github.com/pelletier/go-toml/compare/v2.1.1...v2.2.0 )
---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 11:28:58 +02:00
dependabot[bot]
5608ba1f75
build(deps): bump github.com/yuin/goldmark from 1.7.0 to 1.7.1
...
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark ) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/yuin/goldmark/releases )
- [Commits](https://github.com/yuin/goldmark/compare/v1.7.0...v1.7.1 )
---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 11:27:59 +02:00
Joe Mooring
7bf1abfc55
tpl/strings: Improve type checking
2024-04-04 18:34:55 +02:00
dependabot[bot]
2fedca6c8a
build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront
...
Bumps [github.com/aws/aws-sdk-go-v2/service/cloudfront](https://github.com/aws/aws-sdk-go-v2 ) from 1.32.6 to 1.35.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases )
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/fsx/v1.32.6...service/ecs/v1.35.4 )
---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudfront
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 11:16:30 +02:00
dependabot[bot]
07873b74bd
build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 11:15:10 +02:00
Joe Mooring
8a0ea12d8a
tpl/tplimpl: Improve youtube shortcode
...
Changes:
- Add query string params for controls, loop, mute, start, and end
- Add iframe loading attribute
- Obtain default iframe title from YouTube oEmbed API
- Fix autoplay feature
- Improve readability
Closes #3694
Closes #9213
Closes #10520
Closes #10575
Closes #10576
Co-authored-by: sgharms <sgharms@stevengharms.com>
2024-04-04 11:08:30 +02:00
seiya
6f07e5976d
errors: Return error from cast.ToStringE() consistently
2024-04-04 11:00:14 +02:00
Joe Mooring
2da4ec5738
tpl/tplimpl: Improve embedded opengraph template
...
Changes:
- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability
Closes #8296
Closes #8698
Closes #8991
Closes #9818
Closes #9866
Closes #10647
Co-authored-by: tomy0000000 <git@tomy.me>
Co-authored-by: sean-au <sean@powerfulwebdesign.com.au>
2024-04-02 18:35:43 +02:00
Joe Mooring
6624979e1b
tpl/strings: Create strings.Diff template function
...
Closes #12330
2024-04-02 18:25:44 +02:00
Bjørn Erik Pedersen
983b8d537c
Fix resource bundling for overlapping page.md vs page.txt
...
Fixes #12320
2024-04-02 14:32:05 +02:00
Joe Mooring
6738a3e79d
tpl/tplimpl: Optionally exclude content from sitemap
...
Define global inclusion/exclusion in site configuration, and override
via front matter. For example, to exclude a page from the sitemap:
[sitemap]
disable = true # default is false
Closes #653
Closes #12282
Co-authored-by: kolappannathan <kolappannathan@users.noreply.github.com>
Co-authored-by: felicianotech <FelicianoTech@gmail.com>
2024-04-02 11:21:03 +02:00
Joe Mooring
2f7df4b926
tpl/tplimpl: Remove trailing slash from void elements
...
Closes #11867
2024-04-01 08:07:02 -07:00
Joe Mooring
f0a26cf58e
tpl/tplimpl: Update RSS template
...
- Use publication date for pubdate
- Include version in generator element
Closes #3918
Closes #11692
2024-03-30 18:32:58 +01:00
Joe Mooring
74ce5dc841
tpl/tplimpl: Update schema template
...
Changes:
- Remove trailing comma from list of keywords.
- Improve keywords precedence:
1. Use "keywords" term page titles.
2. Use "keywords" from front matter if "keywords" is not a taxonomy.
3. Use "tags" term page titles.
4. Use term page titles from all taxonomies.
- Enable schema for all page kinds, previously limited to kind = page.
- Remove trailing slashes from void elements.
- Improve readability.
Closes #7570
Co-authored by: 0urobor0s <0urobor0s@users.noreply.github.com>
2024-03-28 14:56:02 +01:00
Joe Mooring
54a8f0ce21
resources: Use different cache key when copying resources
...
Closes #10412
Closes #12310
2024-03-27 09:59:59 +01:00
Bjørn Erik Pedersen
38e05bd3c7
Fix panic with debug.Dump with Page when running the server
...
This replaces the current implementation with `json.MarshalIndent` which doesn't produce the same output, but at least it doesn't crash.
There's a bug in the upstream `litter` library. This can probably be fixed, but that needs to wait.
I have tested `go-spew` which does not crash, but it is very data racy in this context.
FIxes #12309
2024-03-26 20:41:30 +01:00
Joe Mooring
ebfca61ac4
tpl/tplimpl: Update Google Analytics template and config
...
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.
See https://support.google.com/analytics/answer/11583528 .
Changes:
- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings
Closes #11802
Closes #10093
2024-03-26 15:40:51 +01:00
Joe Mooring
e1917740af
hugolib: Conditionally suppress .Site.Author deprecation notice
...
Suppress the .Site.Author deprecation notice unless the Author key
is present and not empty in the site configuration.
Closes #12297
2024-03-26 10:28:03 +01:00
George Ma
27414d43a0
resources/page: Fix GoDoc comment
2024-03-22 08:56:10 +01:00
Joe Mooring
c837f36ab4
markup/asciidocext: Add Level to Heading struct
...
Closes #12291
2024-03-21 19:14:49 +01:00
hugoreleaser
a2f67152b3
releaser: Prepare repository for 0.125.0-DEV
...
[ci skip]
2024-03-20 11:53:43 +00:00
hugoreleaser
db083b05f1
releaser: Bump versions for release of 0.124.1
...
[ci skip]
2024-03-20 11:40:10 +00:00
Bjørn Erik Pedersen
758a876f90
Fix potential deadlock in Translations
...
Fixes #12129
2024-03-20 12:33:05 +01:00
Bjørn Erik Pedersen
19937a20ad
Fix rebuild when changing mixed case named templates
...
Fixes #12165
2024-03-20 12:33:05 +01:00
Anthony Fok
c1ea22a232
testing: Set usesFMA as true for riscv64 too
...
This fixes TestImageOperationsGolden "values are not deep equal" error on riscv64 with Go 1.22 and above.
2024-03-20 08:59:13 +01:00