summaryrefslogtreecommitdiffstats
path: root/config
AgeCommit message (Collapse)Author
2023-07-31config: Do not fail on unknown config keysBjørn Erik Pedersen
Make it a warning. One such example I found in an old site is `blackfriday`. These should be fixed/removed, but it's not important enough to fail the build.
2023-07-28Deprecate taxonomyTermBjørn Erik Pedersen
In favour of 'taxonomy' Closes #11256
2023-07-28Warn about unknown kinds in disableKindsBjørn Erik Pedersen
See #11256
2023-07-28Move all Kind constants to its own packageBjørn Erik Pedersen
See #11256
2023-07-27Use os.UserCacheDir as first fallback if cacheDir is not setBjørn Erik Pedersen
We will now try 1. cacheDir (or, commonly set in environment as `HUGO_CACHEDIR`) 2. if on Netlify we use `/opt/build/cache/hugo_cache/` 3. os.UserCacheDir 4. A temp dir Storing the cache, especially the module cache, in a temporary idea has had lots of hard to debug issues, especially on MacOS, which this commit tries to fix. This should also make it easier to locate the Hugo cache: >UserCacheDir returns the default root directory to use for user-specific cached data. Users should create their own application-specific subdirectory within this one and use that. > >On Unix systems, it returns $XDG_CACHE_HOME as specified by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it returns $HOME/Library/Caches. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache. > >If the location cannot be determined (for example, $HOME is not defined), then it will return an error. Fixes #11286 Fixes #11291
2023-07-27Fix multiple languages in HUGO_DISABLELANGUAGESBjørn Erik Pedersen
Fixes #11278
2023-07-19Fix broken handling of legacy taxonomyTerm in disableKindsBjørn Erik Pedersen
Fixes #11257
2023-07-19Fix cache busting setupBjørn Erik Pedersen
By correctly capturing the target variable when compiling the cache buster. Fixes #11268
2023-07-19Re-instate disableLiveReload as a config option (and not just a flag)Bjørn Erik Pedersen
Closes #11259
2023-07-17Improve error messages for PostCSS etc.Bjørn Erik Pedersen
Fixes #9730
2023-07-16Fix setting config from env with complex (e.g. YAML) stringsBjørn Erik Pedersen
So you can do ``` HUGO_OUTPUTS="home: [rss]" hugo ``` And similar. Fixes #11249
2023-07-08config/allconfig: Update timeout descriptionJoe Mooring
2023-07-08Restore language.disabled configBjørn Erik Pedersen
Fixes #11219
2023-07-08Fix defaultContentLanguageInSubdir with only 1 languageBjørn Erik Pedersen
Fixes #10064
2023-07-07config: Expand default security.exec.osEnv policyDavid Karlsson
To better support private Hugo modules and automatically launching a text editor on content creation, this change adds the following environment variables to the default security policy: - HOME - XDG_CONFIG_HOME - USERPROFILE - SSH_AUTH_SOCK - DISPLAY - LANG Fixes #9333
2023-07-02Rework the build.writeStats structBjørn Erik Pedersen
Mostly to make it easier to toggle on/off this feature from the env. See #11191
2023-07-01Make build.writeStats a structBjørn Erik Pedersen
So you can do ```toml [build.writeStats] tags = true classes = true ids = false ``` Fixes #11191
2023-06-30Only print the path warnings onceBjørn Erik Pedersen
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-29Misc permalinks adjustmentsBjørn Erik Pedersen
* 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-28Fix output formats and media type per language config regressionBjørn Erik Pedersen
Fixes #11159
2023-06-28Don't panic on invalid security whitelist regexpBjørn Erik Pedersen
Fixes #11176
2023-06-26resources/page: Allow section and taxonomy pages to have a permalink ↵Mai-Lapyst
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-19Add empty Environ when loading test configBjørn Erik Pedersen
To prevent OS environment vars confusing the tests.
2023-06-19all: Fix typos in function names and commentsOleksandr Redko
2023-06-18Replace the old log setup, with structured logging etc.Bjørn Erik Pedersen
Fixes #11124
2023-06-15Fix upstream Go templates bug with reversed key/value assignmentBjørn Erik Pedersen
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. This also includes a security fix that now disallows Go template actions in JS literals (inside backticks). This will throw an error saying "... appears in a JS template literal". If you're really sure this isn't a security risk in your case, you can revert to the old behaviour: ```toml [security] [security.gotemplates] allowActionJSTmpl = true ``` See https://github.com/golang/go/issues/59234 Fixes #11112
2023-06-13Fix config merge regression with root slices (e.g. disableKinds)Bjørn Erik Pedersen
Fixes #11089
2023-06-12commands,config: Fix typo in log and error messagesOleksandr Redko
2023-06-12config: Remove unexpected _merge keys introduced in author and social mapsBjørn Erik Pedersen
Fixes #11083
2023-06-12Upgrade to v2 of the Dart Sass Embedded ProtocolBjørn Erik Pedersen
Fixes #11059
2023-06-01commands: Add --lang to hugo configBjørn Erik Pedersen
Fixes #11057
2023-06-01Make sure any default mounts show up in "hugo config"Bjørn Erik Pedersen
Fixes #11040
2023-05-30Fail on invalid defaultContentLanguageBjørn Erik Pedersen
Fixes #11044
2023-05-30Avoid panic in invalid language configBjørn Erik Pedersen
Fixes #11046
2023-05-30Don't panic on empty yaml config paramsBjørn Erik Pedersen
Fixes #11047
2023-05-28Fix it so languageCode on top level config still worksBjørn Erik Pedersen
This is common for monolingual sites, and we broke this in Hugo 0.112.4. Fixes #11037
2023-05-22Add cache busting config to support Tailwind 3Bjørn Erik Pedersen
Fixes #10974
2023-05-20Allow whitelisting mediaTypes used in resources.GetRemoteBjørn Erik Pedersen
Fixes #10286
2023-05-20Add hugo.WorkingDirBjørn Erik Pedersen
Fixes #10969
2023-05-20Make language merging of markup etc. config without values in the rootBjørn Erik Pedersen
Updates #10953
2023-05-19Allow legacy taxonomyTerm in disableKindsBjørn Erik Pedersen
Updates #10953
2023-05-19Fix warn message about custom params on the language top levelAndreas Deininger
2023-05-18all: Fix comments for exported functions and packagesOleksandr Redko
2023-05-18Allow empty params.mainSectionsBjørn Erik Pedersen
Updates #10953
2023-05-18commands: Load config before creating the filesystemBjørn Erik Pedersen
To allow publishDir to be set in config file.
2023-05-17commands: Improve the common build flag handlingBjørn Erik Pedersen
Updates #10947
2023-05-17Support, but warn, about top level language custom paramsBjørn Erik Pedersen
Updates #10947
2023-05-17Handle transient errors in config loading etc.Bjørn Erik Pedersen
As in: Get the Kubernetes site to build with the new Hugo version. Updates #10947
2023-05-16Create a struct with all of Hugo's config optionsBjørn Erik Pedersen
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-03-02Correct typos in Go commentsOleksandr Redko