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
2019-10-13resources/page: Use binary search in Pages.Prev/Next if possibleBjørn Erik Pedersen
This is obviously much faster for lager data sets: ```bash name old time/op new time/op delta SearchPage/ByWeight-100-4 267ns ± 4% 272ns ± 5% ~ (p=0.457 n=4+4) SearchPage/ByWeight-5000-4 10.8µs ± 3% 1.2µs ± 2% -88.99% (p=0.029 n=4+4) SearchPage/ByWeight-10000-4 21.1µs ± 1% 1.4µs ±11% -93.28% (p=0.029 n=4+4) ``` See #4500
2019-10-13Make Pages.Prev/Next work like the other Prev/Next methodsBjørn Erik Pedersen
Fixes #4500
2019-08-12tests: Convert from testify to quicktestBjørn Erik Pedersen
2019-08-10Avoid unnecessary conversionsChristian Muehlhaeuser
No need to convert these types.
2019-08-08Simplify page tree logicBjørn Erik Pedersen
This is preparation for #6041. For historic reasons, the code for bulding the section tree and the taxonomies were very much separate. This works, but makes it hard to extend, maintain, and possibly not so fast as it could be. This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues: This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix. Fixes #6154 Fixes #6153 Fixes #6152
2019-08-05hugolib: Fix output format handling of mix cased page kindsBjørn Erik Pedersen
Fixes #4528
2019-08-01Fix assorted typosXhmikosR
2019-08-01Merge pull request #6149 from bep/sort-caseinsensitiveBjørn Erik Pedersen
Implement lexicographically string sorting
2019-07-25Block symlink dir traversal for /staticBjørn Erik Pedersen
This is in line with how it behaved before, but it was lifted a little for the project mount for Hugo Modules, but that could create hard-to-detect loops.
2019-07-24Add Hugo ModulesBjørn Erik Pedersen
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
2019-06-10tpl/collections: Fix slice type handling in sortBjørn Erik Pedersen
The `sort` template func was producing a `[]page.Page` which did not work in `.Paginate`. Fixes #6023
2019-06-09hugolib: Fix bundle path when slug is setBjørn Erik Pedersen
Fixes #4870
2019-05-26Remove references to Google+Bruno Amaral
According to google, this is no longer supported and structured data should be used instead: https://support.google.com/webmasters/answer/6083347?hl=en
2019-04-20Fix links for non-HTML output formatsBjørn Erik Pedersen
They were not correct for regular pages. Fixes #5877
2019-04-13Fix WeightedPages in union etc.Bjørn Erik Pedersen
We introduced a callback func() to get the owner Page in 0.55.0. Sadly, funcs is not comparable type in Go. This commit replaces the func with a struct pointer that wraps the Page. Fixes #5850
2019-04-09resources/page: Fix .RSSLinke deprecation messageBjørn Erik Pedersen
Closes #4427
2019-04-05resources/page: Regenerate JSON wrapperBjørn Erik Pedersen
2019-04-05resources/page: Add missing GitInfo to PageBjørn Erik Pedersen
2019-04-02resources/page: Implement compare.ProbablyEqer for the core slicesBjørn Erik Pedersen
Fixes #5808
2019-04-02hugolib: Allow relative URLs in front matterBjørn Erik Pedersen
Before this commit you would have to do this in multilingual setups: ``` --- title: "Custom!" url: "/jp/custom/foo" --- ``` This commit allows for relative URLs, e.g: ``` --- title: "Custom!" url: "custom/foo" --- ``` Which is obviously easier and more portable. The meaning of relative may change to include more in the future (e.g. role based access). Fixes #5704
2019-03-26Avoid nilpointer on no File on PageBjørn Erik Pedersen
Fixes #5781
2019-03-25resources/page: Re-introduce .Page.PageBjørn Erik Pedersen
It was removed in 597e418cb02883418f2cebb41400e8e61413f651 -- it's not documented, but it's used in too many real sites on the web. See #5784
2019-03-23Make Page an interfaceBjørn Erik Pedersen
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct. This is all a preparation step for issue #5074, "pages from other data sources". But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes. Most notable changes: * The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday. This means that any markdown will partake in the global ToC and footnote context etc. * The Custom Output formats are now "fully virtualized". This removes many of the current limitations. * The taxonomy list type now has a reference to the `Page` object. This improves the taxonomy template `.Title` situation and make common template constructs much simpler. See #5074 Fixes #5763 Fixes #5758 Fixes #5090 Fixes #5204 Fixes #4695 Fixes #5607 Fixes #5707 Fixes #5719 Fixes #3113 Fixes #5706 Fixes #5767 Fixes #5723 Fixes #5769 Fixes #5770 Fixes #5771 Fixes #5759 Fixes #5776 Fixes #5777 Fixes #5778