Joe Mooring
84b31721bf
markup/goldmark: Change link and image render hook enablement to enums
...
Closes #13535
2025-07-07 11:19:34 +02:00
Bjørn Erik Pedersen
eaf5ace30d
Fix recent regression with cascading of params to content adapters
...
Fixes #13743
2025-05-26 21:26:19 +02:00
Bjørn Erik Pedersen
bc98e7a80d
config: Fix env override of slices
...
Fixes #13707
2025-05-11 19:24:24 +02:00
Bjørn Erik Pedersen
c745a3e108
Fix/implement cascade for content adapters
...
Fixes #13692
2025-05-10 15:12:24 +02:00
Bjørn Erik Pedersen
b39b249623
config: Add some more merge tests
...
See #13681
2025-05-02 11:15:38 +02:00
Bjørn Erik Pedersen
179aea11ac
config: Fix _merge issue when key doesn't exist on the left side
...
Fixes #13643
Fixes #13646
2025-04-24 13:56:27 +02:00
Bjørn Erik Pedersen
1408c156d8
tpl: Detect and fail on infinite template recursion
...
Fixes #13627
2025-04-21 15:17:20 +02:00
Bjørn Erik Pedersen
83cfdd78ca
Reimplement and simplify Hugo's template system
...
See #13541 for details.
Fixes #13545
Fixes #13515
Closes #7964
Closes #13365
Closes #12988
Closes #4891
2025-04-06 20:59:41 +02:00
Bjørn Erik Pedersen
812ea0b325
config: Use the non-global logger for deprecations when possible
...
To prevent warnings leaking into parallel tests.
2025-04-03 13:43:54 +02:00
Bjørn Erik Pedersen
521911a576
all: Run modernize -fix ./...
2025-02-26 11:44:25 +01:00
Joe Mooring
5de3913ed4
config/allconfig: Deprecate :filename and :slugorfilename tokens
2025-02-17 12:06:32 +01:00
Bjørn Erik Pedersen
9b5f786df8
Deprecate kind, lang, and path from front matter
...
These were added to the page meta object when we implemented "pages from data", but were not meant to be used in front matter.
That is not supported, so we might as well add validation.
Fixes #12484
2025-02-10 21:22:43 +01:00
Bjørn Erik Pedersen
c2fb221209
Add ContentTypes to config
...
This is an empty struct for now, but we will most likely expand on that.
```
[contentTypes]
[contentTypes.'text/markdown']
```
The above means that only Markdown will be considered a content type. E.g. HTML will be treated as plain text.
Fixes #12274
2025-02-08 10:31:15 +01:00
Bjørn Erik Pedersen
7f0f50b133
Make cascade front matter order deterministic
...
Fixes #12594
2025-01-23 09:45:47 +01:00
Joe Mooring
1191467c05
tpl/tplimpl: Deprecate twitter shortcode in favor of x shortcode
...
Closes #13214
2025-01-16 10:33:34 +01:00
Bjørn Erik Pedersen
76993369a0
For render hooks, only fallback to HTML (or the defaultOutputFormat) template
...
Closes #13242
2025-01-15 19:59:58 +02:00
Bjørn Erik Pedersen
cfa0801815
Fix NPX issue with TailwindCSS v4
...
This allows the `tailwindcss` CLI binary to live in the `PATH` for NPM-less projects.
Fixes #13221
2025-01-07 13:12:08 +01:00
Joe Mooring
7888ac585c
config/allconfig: Fix slice of language configs
...
Fixes #13201
2024-12-30 10:54:56 +01:00
Joe Mooring
eb1dbe0709
config/allconfig: Throw error when output format is not defined
...
Fixes #13199
2024-12-29 21:38:46 +01:00
Bjørn Erik Pedersen
75ad9cdaab
Add config option disableDefaultLanguageRedirect
...
Fixes #13133
2024-12-12 21:47:03 +01:00
Bjørn Erik Pedersen
e293e7ca6d
Add js.Batch
...
Fixes #12626
Closes #7499
Closes #9978
Closes #12879
Closes #13113
Fixes #13116
2024-12-12 21:43:17 +01:00
Bjørn Erik Pedersen
ad43d137d5
Remove deprecations <= v0.122.0 (note)
...
These have, once we release this, been logging ERROR for 6 minor versions.
2024-11-16 20:32:43 +01:00
Bjørn Erik Pedersen
21366e0411
config: Imrove uglyurls section test
...
Updates #12926
2024-10-14 10:03:44 +02:00
Akkuman
ea633dd809
config: Fix uglyurls map parse
...
Fixes #12926
2024-10-14 10:03:44 +02:00
Joe Mooring
d1ba52f3c3
tests: Address deprecation warnings and errors
2024-09-29 10:49:26 +02:00
Bjørn Erik Pedersen
e363964f2f
commands: Ignore "module does not exist" errors in hugo mod init
...
Closes #11458
2024-09-19 12:26:04 +02:00
Joe Mooring
7792392a6f
config: Fix pagination deprecation messages
2024-08-21 22:01:59 +02:00
Bjørn Erik Pedersen
01008ba512
Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrder
...
See #12776
2024-08-17 16:47:50 +02:00
Bjørn Erik Pedersen
e1317dd322
Add css.TailwindCSS
...
Closes #12618
Closes #12620
2024-06-25 15:48:02 +02:00
Bjørn Erik Pedersen
6cd0784e44
Implement defer
...
Closes #8086
Closes #12589
2024-06-23 11:25:47 +02:00
Bjørn Erik Pedersen
8731d88222
Fix Erroridf/Warnidf mixed case issue
...
Fixes #12617
2024-06-22 19:01:56 +02:00
Bjørn Erik Pedersen
9f22bc4414
Rename DefaultPageSize => PagerSize
...
This was recently introduced. so no breaking change.
The thing is:
* We do not commonly use the prefix Default* even if it can be overridden in the templates.
* PagerSize makes more sense and is also the term used in the code.
2024-06-09 12:28:24 +02:00
Bjørn Erik Pedersen
9c4e14eb4f
Add option to not generate aliases for first page of pagination pages
...
Also consolidate the pagination configuration into a struct.
Closes #12572
2024-06-08 15:42:01 +02:00
Bjørn Erik Pedersen
447108fed2
Add a HTTP cache for remote resources.
...
Fixes #12502
Closes #11891
2024-06-04 16:07:39 +02:00
Bjørn Erik Pedersen
e2d66e3218
Create pages from _content.gotmpl
...
Closes #12427
Closes #12485
Closes #6310
Closes #5074
2024-05-14 13:12:08 +02:00
Bjørn Erik Pedersen
babcb339a8
config: Setups with only one active language can never be multihost
...
Fixes #12288
2024-04-25 14:35:49 +02:00
Joe Mooring
09eb822822
hugolib: Display server address after each rebuild
...
Closes #12359
2024-04-13 22:16:00 +02:00
Bjørn Erik Pedersen
1f1c62e6c7
Add segments config + --renderSegments flag
...
Named segments can be defined in `hugo.toml`.
* Eeach segment consists of zero or more `exclude` filters and zero or more `include` filters.
* Eeach filter consists of one or more field Glob matchers.
* Eeach filter in a section (`exclude` or `include`) is ORed together, each matcher in a filter is ANDed together.
The current list of fields that can be filtered are:
* path as defined in https://gohugo.io/methods/page/path/
* kind
* lang
* output (output format, e.g. html).
It is recommended to put coarse grained filters (e.g. for language and output format) in the excludes section, e.g.:
```toml
[segments.segment1]
[[segments.segment1.excludes]]
lang = "n*"
[[segments.segment1.excludes]]
no = "en"
output = "rss"
[[segments.segment1.includes]]
term = "{home,term,taxonomy}"
[[segments.segment1.includes]]
path = "{/docs,/docs/**}"
```
By default, Hugo will render all segments, but you can enable filters by setting the `renderSegments` option or `--renderSegments` flag, e.g:
```
hugo --renderSegments segment1,segment2
```
For segment `segment1` in the configuration above, this will:
* Skip rendering of all languages matching `n*`, e.g. `no`.
* Skip rendering of the output format `rss` for the `en` language.
* It will render all pages of kind `home`, `term` or `taxonomy`
* It will render the `/docs` section and all pages below.
Fixes #10106
2024-03-16 15:53:26 +01:00
Joe Mooring
d4d49e0f0e
hugolib: Deprecate site methods Author, Authors, and Social
...
Closes #12228
2024-03-15 17:26:45 +01:00
Joe Mooring
dc6a292133
common/hugo: Rename IsMultiHost and IsMultiLingual
...
hugo.IsMultiHost => hugo.IsMultihost
hugo.IsMultiLingual => hugo.IsMultilingual
Closes #12232
2024-03-13 17:34:42 +02:00
Bjørn Erik Pedersen
1736ef7459
Fix cascade-pattern-with-extension for cascade in site config
...
Also clean up the log handling in the integration tester, most notably lost logs during the config loading.
Fixes #12151
2024-02-26 17:29:37 +01:00
Joe Mooring
80e69344da
config/allconfig: Fix typo
...
Closes #12134
2024-02-23 12:40:15 -08:00
Joe Mooring
36bf3cb98c
hugolib: Add capitalizeListTitles config option
...
Whether to capitalize automatic page titles, applicable to section,
taxonomy, and term pages. Default is true.
Closes #9793
Closes #12115
2024-02-23 09:32:32 +01:00
Bjørn Erik Pedersen
639073e4fe
Fix rebuild with resources.Concat
...
Fixes #12017
2024-02-16 13:17:53 +01:00
Bjørn Erik Pedersen
0257eb50a4
Avoid impporting deploy from config when nodeploy tag is set
...
Test:
```
go list -tags nodeploy ./... | grep deploy
```
Fixes #12009
2024-02-07 20:38:13 +01:00
Bjørn Erik Pedersen
609d798e34
Handle resource changes when the resources is already evicted from cache
...
Also fix a logical flaw in the cache resizer that made it too aggressive. After this I haven't been able to reproduce #11988 , but I need to look closer.
Closes #11973
Updates #11988
2024-02-04 16:55:06 +01:00
Bjørn Erik Pedersen
058f230a1b
Detect now invalid path patterns in cascade
...
Closes #11977
2024-02-03 15:07:59 +01:00
Bjørn Erik Pedersen
4174a7866b
Fix disabled languages regression
...
Fixes #11959
2024-02-01 19:42:55 +01:00
Bjørn Erik Pedersen
5b7cb258ec
Create default link and image render hooks
...
Fixes #11933
2024-01-30 20:12:19 +01:00
Bjørn Erik Pedersen
4e84f57efb
Add warnidf template function
...
Also rename config `ignoreErrors` => `ignoreLogs`
But the old still works.
Closes #9189
2024-01-30 20:12:03 +01:00