Bjørn Erik Pedersen
5afc89f2bf
Rework the build.writeStats struct
...
Mostly to make it easier to toggle on/off this feature from the env.
See #11191
2023-07-02 13:04:11 +02:00
Bjørn Erik Pedersen
11ecea6106
Make build.writeStats a struct
...
So you can do
```toml
[build.writeStats]
tags = true
classes = true
ids = false
```
Fixes #11191
2023-07-01 15:38:32 +02:00
Bjørn Erik Pedersen
ffd37d4f75
Only print the path warnings once
...
We could reset and rerun it on server rebuilds, but that report needs a full build to make sense.
Also clean up the config vs flags in this area: Make all config settings match the flags e.g. `printPathWarnings`, but set up aliases for the
old.
Fixes #11187
2023-06-30 10:24:28 +02:00
Bjørn Erik Pedersen
7917961d59
Misc permalinks adjustments
...
* Move config loading to the page package
* Fix a lower bound panic for the `:sections` slice syntax.
* Always return the `:title`
* Add some permalinks integration tests
* Also see issues below
Fixes #9448
Fixes #11184
See #8523
2023-06-29 10:14:19 +02:00
Bjørn Erik Pedersen
79639c981c
Fix output formats and media type per language config regression
...
Fixes #11159
2023-06-28 12:33:33 +02:00
Bjørn Erik Pedersen
7f698c8934
Don't panic on invalid security whitelist regexp
...
Fixes #11176
2023-06-28 08:57:28 +02:00
Bjørn Erik Pedersen
fa0e16f4c7
Fix false path warnings with resources.PostProcess
...
Fixes #7735
2023-06-27 21:55:35 +02:00
Mai-Lapyst
cc14c6a52c
resources/page: Allow section and taxonomy pages to have a permalink configuration
...
Allows using permalink configuration for sections (branch bundles) and
also for taxonomy pages. Extends the current permalink configuration to
be able to specified per page kind while also staying backward compatible:
all permalink patterns not dedicated to a certain kind, get automatically
added for both normal pages and term pages.
Fixes #8523
2023-06-26 15:31:01 +02:00
Oleksandr Redko
9009c8cdca
all: Fix typos in function names and comments
2023-06-19 09:26:29 +02:00
Bjørn Erik Pedersen
7c9fada778
Replace the old log setup, with structured logging etc.
...
Fixes #11124
2023-06-18 13:03:04 +02:00
Bjørn Erik Pedersen
90b2674ddc
Re-add site.RSSLink (and deprecate it)
...
Fixes #11110
2023-06-14 12:18:11 +02:00
Bjørn Erik Pedersen
21d17566a3
Fix .Width and .Height for animated gifs
...
Fixes #11079
2023-06-14 09:21:22 +02:00
Bjørn Erik Pedersen
60a2cdf72d
Fix config merge regression with root slices (e.g. disableKinds)
...
Fixes #11089
2023-06-13 18:01:23 +02:00
Bjørn Erik Pedersen
b7dc93ca11
config: Remove unexpected _merge keys introduced in author and social maps
...
Fixes #11083
2023-06-12 14:30:43 +02:00
Bjørn Erik Pedersen
f210188da3
Upgrade to v2 of the Dart Sass Embedded Protocol
...
Fixes #11059
2023-06-12 13:47:38 +02:00
Bjørn Erik Pedersen
5e5ce00d41
Fix menuItem.URL when pageRef is not set
...
Fixes #11062
2023-06-02 09:04:00 +02:00
Bjørn Erik Pedersen
a191b38ac8
Don't inject livereload script on hugo -w
...
Fixes #11061
2023-06-02 09:04:00 +02:00
Bjørn Erik Pedersen
0ef2952846
commands: Add --lang to hugo config
...
Fixes #11057
2023-06-01 10:49:21 +02:00
Bjørn Erik Pedersen
e3ae8f025d
Make sure any default mounts show up in "hugo config"
...
Fixes #11040
2023-06-01 10:49:21 +02:00
Bjørn Erik Pedersen
9cdca1f958
Fail on invalid defaultContentLanguage
...
Fixes #11044
2023-05-30 15:59:43 +02:00
Bjørn Erik Pedersen
6462eecfbd
Avoid panic in invalid language config
...
Fixes #11046
2023-05-30 15:59:43 +02:00
Bjørn Erik Pedersen
a7d6b1413f
Don't panic on empty yaml config params
...
Fixes #11047
2023-05-30 15:59:43 +02:00
Bjørn Erik Pedersen
e3dfc76fa8
Fix it so languageCode on top level config still works
...
This is common for monolingual sites, and we broke this in Hugo 0.112.4.
Fixes #11037
2023-05-28 18:42:10 +02:00
Bjørn Erik Pedersen
6c2db0dfb0
Add language.LanguageCode
...
But keep an alias at Site
Closes #11027
2023-05-27 16:56:54 +02:00
Bjørn Erik Pedersen
9a235d0afc
Fix regression with site.IsServer when not running a server
...
Fixes #11006
2023-05-24 12:42:56 +02:00
Bjørn Erik Pedersen
ed906a86e2
Fix regression when config for OutputFormat.BaseName is an empty string
...
Fixes #11000
2023-05-23 19:23:39 +02:00
Bjørn Erik Pedersen
bd38e35f97
Revert "postcss: Improve validation of option 'config'"
...
This reverts commit 9a0370e8eb
.
Closes #10990
2023-05-22 20:31:59 +02:00
Andreas Deininger
9a0370e8eb
postcss: Improve validation of option 'config'
2023-05-22 18:14:10 +02:00
Bjørn Erik Pedersen
4cac5f5e30
Avoid writing to hugo_stats.json when there are no changes
...
Fixes #10985
2023-05-22 16:27:19 +02:00
Bjørn Erik Pedersen
2c3d4dfb74
Add cache busting config to support Tailwind 3
...
Fixes #10974
2023-05-22 14:14:35 +02:00
Bjørn Erik Pedersen
2637b4ef4d
Allow whitelisting mediaTypes used in resources.GetRemote
...
Fixes #10286
2023-05-20 20:16:45 +02:00
Bjørn Erik Pedersen
7c7baa6183
Add hugo.WorkingDir
...
Fixes #10969
2023-05-20 17:45:56 +02:00
Bjørn Erik Pedersen
4f085e80da
Make language merging of markup etc. config without values in the root
...
Updates #10953
2023-05-20 12:40:32 +02:00
Bjørn Erik Pedersen
03cb38e6c6
Allow legacy taxonomyTerm in disableKinds
...
Updates #10953
2023-05-19 09:17:55 +02:00
Oleksandr Redko
610cedaa61
all: Fix comments for exported functions and packages
2023-05-18 21:25:27 +02:00
Bjørn Erik Pedersen
7c647bcaeb
Allow empty params.mainSections
...
Updates #10953
2023-05-18 17:55:29 +02:00
Bjørn Erik Pedersen
8a69ccbb00
commands: Improve the common build flag handling
...
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
7ce033a89d
Support, but warn, about top level language custom params
...
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
05542130ba
Handle transient errors in config loading etc.
...
As in: Get the Kubernetes site to build with the new Hugo version.
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5d857165fe
Deprecate site.Language.Params and some other fixes
...
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
faa6998f26
Add Sections to Site interface
...
See https://github.com/gohugoio/hugo/issues/10947#issuecomment-1550012671
Updates #10947
2023-05-16 18:53:34 +02:00
Bjørn Erik Pedersen
241b21b0fd
Create a struct with all of Hugo's config options
...
Primary motivation is documentation, but it will also hopefully simplify the code.
Also,
* Lower case the default output format names; this is in line with the custom ones (map keys) and how
it's treated all the places. This avoids doing `stringds.EqualFold` everywhere.
Closes #10896
Closes #10620
2023-05-16 18:01:29 +02:00
Bjørn Erik Pedersen
e0e19a934f
Expand the baseline benchmark a little
2023-05-15 08:39:52 +02:00
Bjørn Erik Pedersen
9906c1ae52
Prevent the global error collector to panic when sending on closed channel
2023-04-13 11:44:22 +02:00
Bjørn Erik Pedersen
5748133d50
Add test for ToC vs include
...
See #10866
2023-03-29 17:49:01 +02:00
Bjørn Erik Pedersen
b0b1b76dc9
markup/goldmark: Fail on invalid Markdown attributes
2023-03-15 08:54:34 +01:00
Bjørn Erik Pedersen
e7148f335f
Fix "unknown shortcode token" when calling shortcode within fenced code block
...
Fixes #10819
2023-03-12 11:39:38 +01:00
Andreas Deininger
d55af2abf0
Run gofmt -s on source files
2023-03-12 10:32:29 +01:00
Andreas Deininger
9818724b5b
Improve error message for unclosed shortcode with inner content
2023-03-10 18:41:17 +01:00
Bjørn Erik Pedersen
34a86e13f6
Don't fail when calling Paginate with an empty pages.PagesGroup
...
Fixes #10802
2023-03-10 16:34:17 +01:00