Bjørn Erik Pedersen
7ae62f4aa3
Create hugo_stats.json if it's mounted but does not exists
...
A common pattern for Tailwind 3 is to mount that file to get it on the server watch list.
A common pattern is also to add hugo_stats.json to .gitignore.
This has meant that the first time you start the server (no hugo_stats.json), it just doesn't work as expected.
Fixes #11264
2023-07-19 19:50:37 +02:00
Bjørn Erik Pedersen
f1a061e9ed
Re-instate disableLiveReload as a config option (and not just a flag)
...
Closes #11259
2023-07-19 19:50:37 +02:00
Bjørn Erik Pedersen
c406fd3a0e
Fix setting config from env with complex (e.g. YAML) strings
...
So you can do
```
HUGO_OUTPUTS="home: [rss]" hugo
```
And similar.
Fixes #11249
2023-07-16 18:08:23 +02:00
David Karlsson
286821e360
Fix for data mounts in sub folders
...
Before this change, data files from Hugo modules were always mounted at the
root of the `data` directory. The File and FileMetaInfo structs for modules
are different from 'native' data directories.
This changes how the keyParts for data files are generated so that data
from modules or native directories are treated the same.
2023-07-15 11:13:08 +02:00
Bjørn Erik Pedersen
cc44583cc3
Improve behavior of defaultContentLanguageInSubdir when only the default language is enabled
...
1 .Create sitemapindex in root of publishDir (will contain link to sitemap.xml in defaultContentLanguage site)
2. Create index.html in root of publishDir (will redirect to defaultContentLanguage site)
Fixes #11229
2023-07-13 18:06:36 +02:00
Bjørn Erik Pedersen
4da672af88
Return error when .Render is invoked without arg
...
Fixes #11243
2023-07-13 18:06:36 +02:00
Bjørn Erik Pedersen
a481942532
Restore language.disabled config
...
Fixes #11219
2023-07-08 16:51:48 +02:00
Bjørn Erik Pedersen
6019953769
Fix static content files multilingual root regression
...
Fixes #11223
2023-07-08 16:08:46 +02:00
Bjørn Erik Pedersen
92e86702ea
Fix defaultContentLanguageInSubdir with only 1 language
...
Fixes #10064
2023-07-08 16:08:46 +02:00
Anthony Fok
bf7ee8a91a
Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0
2023-07-04 09:14:48 +02:00
Bjørn Erik Pedersen
ceb486f98c
Fix buildStats when tags and classes are disabled
...
Fixes #11202
2023-07-03 09:58:33 +02:00
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