summaryrefslogtreecommitdiffstats
path: root/hugolib
AgeCommit message (Collapse)Author
2024-03-16Add segments config + --renderSegments flagBjørn Erik Pedersen
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-16Fix .Parent when there are overlapping regular pages inbetweenBjørn Erik Pedersen
Fixes #12263
2024-03-16hugolib: Remove Site.HomeAbsURLBjørn Erik Pedersen
It's not in use and after #12266 it's also not corret to use on its own (use .Site.Home.Permalink).
2024-03-16hugolib: Fix sitemap index with monolingual siteJoe Mooring
Fixes #12266
2024-03-15hugolib: Deprecate site methods Author, Authors, and SocialJoe Mooring
Closes #12228
2024-03-15Fix translationKey handling for term pagesBjørn Erik Pedersen
Fixes #12261
2024-03-15Fix intersect and similar for term entry page collectionsBjørn Erik Pedersen
Fixes #12254
2024-03-15Fix server rebuilds when adding sub sections especially on WindowsBjørn Erik Pedersen
This commit also optimizes for the case where change events for both file (e.g. `_index.md`) and the container directory comes in the same event batch. While testing this on Windows 11 (ARM64), I notice that Windows behaves a little oddly when dumping a folder of files into the content tree; it works (at least after this commit), but it seems like the event batching behaves differently compared to other OSes (even older Win versions). A related tip would be to try starting the server with polling, to see if that improves the situation, e.g.: ``` hugo server --poll 700ms ``` Fixes #12230
2024-03-14tpl/tplimpl: Modify figure shortcode to look for page resourceJoe Mooring
Closes #12244 Closes #12245
2024-03-13Fix panic when changing archetype files when servere is runningBjørn Erik Pedersen
Fixes #12195
2024-03-13Fix Name for nested resourced fetched in resources.ByName and similarBjørn Erik Pedersen
Fixes #12214
2024-03-13common/hugo: Rename IsMultiHost and IsMultiLingualJoe Mooring
hugo.IsMultiHost => hugo.IsMultihost hugo.IsMultiLingual => hugo.IsMultilingual Closes #12232
2024-03-10hugolib: Deprecate .Site.MultiLingual in favor of hugo.IsMultiLingualJoe Mooring
Closes #12224
2024-03-07Don't auto-create empty sections for nested taxonomiesBjørn Erik Pedersen
Fixes #12188
2024-03-07Fix resource name in resources.ByTypeBjørn Erik Pedersen
Fixes #12190
2024-03-07Fix section page resource not published if resource filename partially ↵Bjørn Erik Pedersen
matches content file name Fixes #12198
2024-03-07Fix taxonomy kind template lookup issueBjørn Erik Pedersen
Fixes #12193
2024-03-01hugofs: Fix vertical mount merge issueBjørn Erik Pedersen
Fixes #12175
2024-03-01Fix and add integration test for the Bootstrap SCSS module for both Dart ↵Bjørn Erik Pedersen
Sass and Libsass This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem). The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios. This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage. Fixes #12178
2024-03-01Make sure that sitemaps gets generated even if there is a content bundle ↵Bjørn Erik Pedersen
with the same path Fixes #12183
2024-02-28Fix panic when cascading headless from site config to section that does not ↵Bjørn Erik Pedersen
have an _index.md file Fixes #12172
2024-02-28Fix assets vs data issueBjørn Erik Pedersen
And possibly some other related file mount issues. Fixes #12133
2024-02-28Fix draft for non-default content when content in default language does not ↵Bjørn Erik Pedersen
exist Fixes #12132
2024-02-28Fix .Page.Pages with similary named sectionsBjørn Erik Pedersen
Fixes #12169
2024-02-28Fix single mount rename panicBjørn Erik Pedersen
Fixes #12141
2024-02-27Fix multihost processed image not copied to non-default content languagesBjørn Erik Pedersen
Fixes #12163
2024-02-26Fix cascade-pattern-with-extension for cascade in site configBjørn Erik Pedersen
Also clean up the log handling in the integration tester, most notably lost logs during the config loading. Fixes #12151
2024-02-25Fix term template lookup when its backed by a content fileBjørn Erik Pedersen
Closes #12146
2024-02-25resource: Revert the normalization of Resource.NameBjørn Erik Pedersen
Which means that .Name now returns the same as it did in 0.122.0. Closes #12142
2024-02-25Fix panic for disableKinds page for content resourcesBjørn Erik Pedersen
Fixes #12144
2024-02-24tocss: Fix the import resolving from absolute to relative assets pathsBjørn Erik Pedersen
Fixes #12137
2024-02-23Speed up GetPageBjørn Erik Pedersen
``` name old time/op new time/op delta GetPage-10 413ns ± 0% 287ns ± 1% -30.47% (p=0.029 n=4+4) GetPageRegular/From_root-10 757ns ± 1% 706ns ± 1% -6.75% (p=0.029 n=4+4) GetPageRegular/Page_relative-10 838ns ± 1% 786ns ± 1% -6.16% (p=0.029 n=4+4) name old alloc/op new alloc/op delta GetPage-10 312B ± 0% 24B ± 0% -92.31% (p=0.029 n=4+4) GetPageRegular/From_root-10 328B ± 0% 200B ± 0% -39.02% (p=0.029 n=4+4) GetPageRegular/Page_relative-10 360B ± 0% 232B ± 0% -35.56% (p=0.029 n=4+4) name old allocs/op new allocs/op delta GetPage-10 8.00 ± 0% 2.00 ± 0% -75.00% (p=0.029 n=4+4) GetPageRegular/From_root-10 7.00 ± 0% 5.00 ± 0% -28.57% (p=0.029 n=4+4) GetPageRegular/Page_relative-10 9.00 ± 0% 7.00 ± 0% -22.22% (p=0.029 n=4+4) ```
2024-02-23hugolib: Fix a .Page.GetPage from bundle caseBjørn Erik Pedersen
Fixes #12120
2024-02-23hugolib: Add capitalizeListTitles config optionJoe Mooring
Whether to capitalize automatic page titles, applicable to section, taxonomy, and term pages. Default is true. Closes #9793 Closes #12115
2024-02-22Fix it so not all bundled resources are removed when one translation is draftedBjørn Erik Pedersen
Fixes #12105
2024-02-22Fix regression on handling of overlapping file mountsBjørn Erik Pedersen
But note that the overlay file system is set up horizontally (project -> module1 -> module2), so I would not recommend too complex overlapping mount setups within the same module. But this worked in v0.122.0, so we should fix it. Fixes #12103
2024-02-21Sitemap should not use list.xmlBjørn Erik Pedersen
Fixes #12101
2024-02-21Fix rebuild when adding a bundle with space in nameBjørn Erik Pedersen
Fixes #12092
2024-02-21Fix relative import issue in libsass/dart sassBjørn Erik Pedersen
Fixes #12094
2024-02-21Fix relref regression with trailing slashBjørn Erik Pedersen
Fixes #12096
2024-02-20Fix rebuilding of pages without default content languageBjørn Erik Pedersen
Fixes #12082
2024-02-20Fix dart sass import regressionBjørn Erik Pedersen
Fixes #12072
2024-02-20Fall back to original name in Resources.GetMatch/MatchBjørn Erik Pedersen
Same as we do in .Get. Fixes #12076
2024-02-20Fix robots.txt using the built-in template regressionBjørn Erik Pedersen
Fixes #12071
2024-02-19Handle rebuilds when resources passed to transform.Unmarshal etc. changesBjørn Erik Pedersen
Fixes #12065
2024-02-18Fix handling of build options for term pagesBjørn Erik Pedersen
Fixes #12058
2024-02-18Fix sample logic when adding content files in serverBjørn Erik Pedersen
The partial rebuilds works by calaulating a baseline from a change set. For new content, this doesn't work, so to avoid rebuilding everything, we first try to collect a sample of surrounding identities (e.g. content files in the same section). This commit fixes a flaw in that logic that in some (many...) cases would return a too small sample set. Fixes #12054
2024-02-18all: Fix typos and some URLsChristian Oliff
2024-02-17Fix handling of draft term pagesBjørn Erik Pedersen
By just removing the term page and all of its page entries. Fixes #12055
2024-02-17Don't use the same value in .Data.Term.Title as in .TitleBjørn Erik Pedersen
Fixes #12041