Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-01Fix taxonomy weight sort regressionBjørn Erik Pedersen
Fixes #10406
2022-10-26Revise the fix for shortcode vs output format nilpointerBjørn Erik Pedersen
We do lazy initialization and (potentially) reuse of an output format's rendered content. We do this evaluation when we start a new rendering a new output format. There are, however, situation where these borders gets crossed (e.g. accessing content from another output format). We have a check for this in place for most cases, but not the content rendering of inner markdown blocks inside shortcodes. This patch applies that same logic to the newly introduced RenderContent method (which is not available from the templates). Fixes #10391
2022-10-26Avoid nilpointer when shortcode page content output nildavidejones
Updates #10391
2022-09-27Revert "Adjust a test"Bjørn Erik Pedersen
Committed by mistake. This reverts commit cac773aeffb5626c9bb5a50de6bfec7b6370226d.
2022-09-27Adjust a testBjørn Erik Pedersen
2022-09-26Fix /static performance regression from Hugo 0.103.0Bjørn Erik Pedersen
In `v0.103.0` we added support for `resources.PostProcess` for all file types, not just HTML. We had benchmarks that said we were fine in that department, but those did not consider the static file syncing. This fixes that by: * Making sure that the /static syncer always gets its own file system without any checks for the post process token. * For dynamic files (e.g. rendered HTML files) we add an additional check to make sure that we skip binary files (e.g. images) Fixes #10328
2022-09-14Filter out any duplicate files to post processBjørn Erik Pedersen
Updates #10269
2022-09-14Support PostProcess for all file typesBjørn Erik Pedersen
Not just HTML. Fixes #10269
2022-09-08Add `--force` to `hugo new`satotake
Closes #9243
2022-09-01Fix shortcode parser regression with quoted param valuesBjørn Erik Pedersen
This issue was introduced in `v0.102.0`. In 223bf2800488ad5d38854bbb595d789bc35ebe32 we removed the byte source from the parsed page result, which meant we had to preserve exact positioning for all elements. This introduced some new `TypeIgnore` tokens which we, wrongly, assumed didn't matter where we put in the result slice (they should be ignored anyway). But it seems that this broke the logic where we determine if it's positional or named params in the case where the paramater value contains escaped quoutes. This commit makes sure that these ignore tokens (the back slashes) are never sent back to the client, which is how it was before `v0.102.0`. This commit also fixes some lost error information in that same commit. Fixes #10236
2022-07-09parser/pageparser: Don't store the byte slicesBjørn Erik Pedersen
On its own this change doesn't do any magic, but this is part of a bigger picture about making Hugo leaner in the memory usage department.
2022-06-30Make the baseline benchmark's test files stableBjørn Erik Pedersen
And add some assertions.
2022-06-26Extract the baseline benchmark to a testBjørn Erik Pedersen
2022-06-25Add a baseline benchmarkBjørn Erik Pedersen
2022-06-14deps: Udpate to github.com/alecthomas/chroma/v2Bjørn Erik Pedersen
Fixes #9932 Fixes #9931
2022-06-13Fix relURL with leading slash when baseURL includes a subdirectoryBjørn Erik Pedersen
Fixes #9994
2022-06-07Fix raw TOML dates in where/eqBjørn Erik Pedersen
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes #9979
2022-06-04helpers: Fix panic with invalid defaultMarkdownHandlerBjørn Erik Pedersen
Fixes #9968
2022-06-01Fix panic with markdownify/RenderString with shortcode on Page with no ↵Bjørn Erik Pedersen
content file Fixes #9959
2022-05-31Fix indentation in highlight shortcodeBjørn Erik Pedersen
This commit adds a new `.InnerDeindent` method to the shortcode context, which is `.Inner` with any indendation removed. This is then used in the built-in `highlight` shortcode to prevent the extra whitespace getting hightlighted. Fixes #4717
2022-05-30Make .RenderString render shortcodesBjørn Erik Pedersen
Fixes #6703
2022-05-30Improve shortcode indentation handlingBjørn Erik Pedersen
* Record the leading whitespace (tabs, spaces) before the shortcode when parsing the page. * Apply that indentation to the rendered result of shortcodes without inner content (where the user will apply indentation). Fixes #9946
2022-05-30Add Markdown as an output formatBjørn Erik Pedersen
The motivation behind this is not to make it easier to publish Markdown files, as that sounds unusual. This is mainly meant for shortcodes that produces Markdown to be inlined. You would do this by creating shortcodes with `*.md` suffix (e.g. `layouts/shortcodes/myshortcode.md`). This output format is defined as plain text, and will use Go's much more lenient text template parser. Updates #9821
2022-05-29Add a shortcode benchmarkBjørn Erik Pedersen
2022-05-29Remove Blackfriday markdown engineBjørn Erik Pedersen
It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be a mature replacement by now. Closes #9934
2022-05-28Fix HasMenuCurrent and IsDescendant/IsAncestor when comparing to itselfBjørn Erik Pedersen
There may be sites in the wild that depends on the faulty behaviour of IsDescendant/IsAncestor when comparing to itself, but * The documentation and common sense says that a thing cannot be descendant or ancestor to itself. * The bug introduced in `HasMenuCurrent` comes directly from that confusion. Fixes #9846
2022-05-27Don't use the baseURL /path as part of the resource cache keyBjørn Erik Pedersen
As that prevents Hugo projects with sub paths in their `baseURL` to use themes with cached resources. Fixes #9787
2022-05-25Fix Plainify edge casesBjørn Erik Pedersen
This commit replaces the main part of `helpers.StripHTML` with Go's implementation in its html/template package. It's a little slower, but correctness is more important: ```bash BenchmarkStripHTMLOld-10 680316 1764 ns/op 728 B/op 4 allocs/op BenchmarkStripHTMLNew-10 384520 3099 ns/op 2089 B/op 10 allocs/op ``` Fixes #9199 Fixes #9909 Closes #9410
2022-05-24basefs: add `noBuildLock` flagsatotake
If the flag is enabled, `.hugo_build.lock` will not be created. This ensures safe running on read-only filesystem etc. Close #9780
2022-05-15server: Fix SIGINT handling after loading bad configurationBjørn Erik Pedersen
Also fix the config error messages. Fixes #9664
2022-05-15Improve SASS errorsBjørn Erik Pedersen
Fixes #9897
2022-05-15postcss: Fix import error handlingBjørn Erik Pedersen
Note that we will now fail if `inlineImports` is enabled and we cannot resolve an import. You can work around this by either: * Use url imports or imports with media queries. * Set `skipInlineImportsNotFound=true` in the options Also get the argument order in the different NewFileError* funcs in line. Fixes #9895
2022-05-14errors: Misc improvementsBjørn Erik Pedersen
* Redo the server error template * Always add the content file context if relevant * Remove some now superflous error string matching * Move the server error template to _server/error.html * Add file context (with position) to codeblock render blocks * Improve JS build errors Fixes #9892 Fixes #9891 Fixes #9893
2022-05-09hugolib: Check for nil in shouldRenderBjørn Erik Pedersen
2022-05-08Use configured timeZone for the clockBjørn Erik Pedersen
And some other related adjustments. Updates #8787
2022-05-08Add `clock` cli flagsatotake
Close #8787
2022-05-06Improve error messages, esp. when the server is runningBjørn Erik Pedersen
* Add file context to minifier errors when publishing * Misc fixes (see issues) * Allow custom server error template in layouts/server/error.html To get to this, this commit also cleans up and simplifies the code surrounding errors and files. This also removes the usage of `github.com/pkg/errors`, mostly because of https://github.com/pkg/errors/issues/223 -- but also because most of this is now built-in to Go. Fixes #9852 Fixes #9857 Fixes #9863
2022-04-28Some godoc adjustments and image struct renamesBjørn Erik Pedersen
2022-04-27deps: Update github.com/yuin/goldmark v1.4.11 => v1.4.12Joe Mooring
Fixes #9054 Fixes #9756 Fixes #9757
2022-04-23tpl/lang: Handle nil values in lang.MergeBjørn Erik Pedersen
2022-04-23Deprecate page.Author and page.AuthorsBjørn Erik Pedersen
These are not documented, and they don't belong on Page. We should consider having author a first class citizen of Hugo, but as it is not it's better modelled as a taxonomy.
2022-04-16Fix MediaType when reading images from cacheBjørn Erik Pedersen
Fixes #8931
2022-04-12Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language awareBjørn Erik Pedersen
Fixes #2180
2022-04-10Replace all usage of CopyOnWriteFs with OverlayFsBjørn Erik Pedersen
Fixes #9761
2022-04-08Rework the Destination filesystem to make --renderStaticToDisk workBjørn Erik Pedersen
See #9626
2022-04-08Revert "Revert "Allow rendering static files to disk and dynamic to memory ↵Bjørn Erik Pedersen
in server mode"" This reverts commit 64b7b7a89753a39661219b2fcb92d7f185a03f63.
2022-04-05resources: Create a common ResourceFinder interfaceBjørn Erik Pedersen
And make both .Resources and resources implement it. This gets us 2 new methods/functions, so you can now also do: * .Resources.Get * resources.ByType Note that GetRemote is not covered by this interface, as that is only available as a global template function. Fixes #8653
2022-04-05Localize all the GroupBy*Date methodsBjørn Erik Pedersen
Fixes #9745
2022-04-05Add environment as a new filter to _cascade.targetCathrine Paulsen
Fixes #9612
2022-03-26Deprecate .File.ExtensionSara Op den Orth
Fixes #9352